Search
 
SCRIPT & CODE EXAMPLE
 

C

How to scale all columns in dataframe in R?

df.scaled <- as.data.frame(scale(df))
Comment

How to scale all columns in dataframe in R- Method 2?


dat %>% mutate_all(scale)
#> # A tibble: 10 x 3
#>         x      y       z
#>     <dbl>  <dbl>   <dbl>
#>  1 -0.827 -0.300 -0.0602
#>  2  0.663 -0.342 -0.725 
#>  3  1.47  -0.774 -0.588 
#>  4 -1.97  -1.13   0.118 
#>  5  0.816 -0.595 -1.02  
#>  6  0.893  1.19   0.998 
#>  7 -0.192  0.328 -0.948 
#>  8 -0.164  1.50  -0.748 
#>  9 -0.182  1.25   1.81  
#> 10 -0.509 -1.12   1.16
Comment

PREVIOUS NEXT
Code Example
C :: tetris rotate shape 
C :: changing data type in one line c program 
C :: ::template 
C :: how to add a number before every line in c language 
C :: python adding calculator 
C :: anticonstitutionnellement 
C :: cannot reach esp8266 via udp while he is running with a static ip 
C :: float and double Output 
C :: /usr/bin/mandb: fopen /var/cache/man/7935: Permission denied 
C :: C static libraries (creating archive from object files) 
C :: terrenery opertori with return in c 
C :: error: dereferencing pointer to incomplete type 
C :: memset c 
C :: calculate max of three numbers using ternary operator in c 
C :: Happy New Year! 
C :: Recommended compiler and linker flags for GCC 
Dart :: flutter remove debug badge 
Dart :: dart math library 
Dart :: How to Create Number Inputfield in Flutter? 
Dart :: Keyboard Pushes Text Fields off screen flutter 
Dart :: flutter textbutton autofocus 
Dart :: get file size flutter 
Dart :: dart parse boolean from string 
Dart :: flutter getx snackbar 
Dart :: flutter reverse list 
Dart :: flutter create app command 
Dart :: dart every 
Dart :: flutter video thumbnail from url 
Dart :: how to validate textformfield on text change flutter 
Dart :: ElevatedButton background flutter 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =