Questions tagged [rescale]

155 questions
3
votes
1 answer

Obtaining unstandardized factor scores from factor analysis

I'm conducting a factor analysis of several variables in R using factanal(). I want to determine each case's factor score, but I want the factor scores to be unstandardized and on the original metric of the input variables. When I run the factor…
itpetersen
  • 1,475
  • 3
  • 13
  • 32
3
votes
1 answer

tweaking scale heatmap with ggplot2

I am a complete newbie with R and please forgive me if this already has been asked a gazillion times. I am trying to make a heatmap using R, following this example, which are tsvs. This is an example. name sam1 sam2 a 0.2 0 b 0.1 0.05 c …
Amit
  • 129
  • 2
  • 7
2
votes
2 answers

Android Canvas slow drawing/animation

I am drawing bitmaps on the canvas using bitmap factory(see P.S.). I also have an animation applyed to my bitmap. I use bitMapFactory.options with options.inScaled = false; options.inDither = true; The problem is when I draw my bitmap which is…
Fofole
  • 3,398
  • 8
  • 38
  • 59
2
votes
1 answer

Change metrics inside rows by condition

Suppose a data: df1 <- tibble::tribble(~"M1", ~"M2", ~"Beer, pints", ~"Coffee, oz", ~"Gasoline, galons", ~"Milk, galons", ~"Warehouse, square feet", ~"Nearest place, miles", "NY", "22", "10", "12", "15", "100", "100", …
2
votes
0 answers

understanding trans_new on ggplot

Coming from this example (pasted here) trans_cube <- trans_new(name = "cube root", transform = cube_root, inverse = cube) # dummy data plot_data <- data.frame(x = 1:10, y =…
Lefty
  • 368
  • 4
  • 11
2
votes
1 answer

Rescale one list of matrices to another

I have two lists of 2-columns matrices like these: > stck.list [[1]] [,1] [,2] [1,] 0.000000000 0.000000000 [2,] 0.001082767 -0.008137698 [3,] -0.005346008 0.013462373 [4,] 0.012179531 0.046037670 [5,] 0.035469135 …
2
votes
1 answer

How can I resize and reshape images with python?

I want to work with a bunch of images (100+) and I need to keep their aspect ratios (which varies between each other), but resize them to be a maximum of 1000x1000 and have a maximum file size of 100kb. I have tried the "optimize-images" package but…
jajajaja
  • 69
  • 3
  • 7
2
votes
1 answer

Shrink text horizontally if width exceeds container size with Unity2D

So, I am trying to use Unity2D to create a TCG/CCG video game, and I seem to have hit a light bump: I cannot seem to efficiently resize horizontally text that ends up being larger than its container. (Example: Text has a width of 200, I want to fit…
2
votes
1 answer

rescale selected data in data.frame in R

I can't get my head around this: Lets say I have a data frame: ID<-c("a","a","b","b","c","c","c","d","d") count_1<-runif(9) count_2<-runif(9) diff<-count_1-count_2 pos<-c(1,1,1,2,2,2,3,3,3) data<-data.frame(ID,count_1,count_2,diff,pos) head(data) …
ben
  • 639
  • 1
  • 7
  • 12
2
votes
1 answer

Inkscape: enlarge figure without creating distortions

(a) what I have, (b) what I get, (c) what I want I have a simple vector graphic in Inkscape, which consists of a rectangle, filled points and stars. Since the axis ranges are not really nice (the height equals approximatly 3 times the width of the…
cerv21
  • 311
  • 1
  • 2
  • 11
2
votes
0 answers

Is there a way to 'freeze' previous CSS transformations before applying more?

In the snippet below I have a div that's rotated 45 degrees. How can we shrink this div along the X axis without modifying the HTML at all? html, body { height: 100%; margin: 0; } html { overflow: hidden; } body { display:…
basement
  • 718
  • 8
  • 15
2
votes
1 answer

Rescale price list from a longer length to a smaller length

Given the following pandas data frame with 60 elements. import pandas as pd data = [60,62.75,73.28,75.77,70.28 ,67.85,74.58,72.91,68.33,78.59 ,75.58,78.93,74.61,85.3,84.63 ,84.61,87.76,95.02,98.83,92.44 …
RaduS
  • 2,465
  • 9
  • 44
  • 65
2
votes
1 answer

d3.js get new domain values after rescale

I try to get the new axes values after rescaling my axes. I tried to get them from y.domain() as answered here but the values returned are the initial values. So what am i doing wrong here? Relevant code: function zoomed() { for(let i = 0; i <…
Getter Jetter
  • 2,033
  • 1
  • 16
  • 37
2
votes
0 answers

Resizing Portrait Bitmap to Landscape Dimensions in Android

I am trying to create a video from a set of images, those images might be of Portrait or Landscape. I want the final video to be of Landscape so I am re-sizing the portrait image to the dimensions of a landscape image. Obviously, the image quality…
San
  • 2,078
  • 1
  • 24
  • 42
2
votes
2 answers

How to apply a set of functions to each group of a grouping variable in R data.frame

I need to reshape data.frame in R in one step. In short, change of values of objects (x1 to x6) is visible row by row (from 1990 to 1995): > tab1[1:10, ] # raw data see plot for tab1 id value year 1 x1 7 1990 2 x1 10 1991 3 x1 11…
Ladislav Naďo
  • 822
  • 12
  • 27
1
2
3
10 11