Scaled R

Re: scaling data

Contribution from Joe_Gerner »

Hello Jörg,

thank you very much for your quick reply.
So my concern is that all variables are in the same value range, for example from 0 to 100

I've already worked on the script and I think I'll get the scaling. The only problem now is that when I run another function, it shows that there are infinite or NA values ​​in the scaled data set. I have already checked both, but could not find either NA or inf values. Anyone happens to know where the error is in my script?

R script:
___________________________________________________________________________________________________________________________

library ('archetypes')
library ('spsurvey') #statistic analysis
library ('graphics')
library ('rcompanion')
library ('MASS')
library ('scales')

setwd ("C: / Users / Desktop / Master thesis / R calculations /")

t <-read.csv2 ("Warburg_wahl.csv")
str (t)


scale_Gebaeude_Hoehe <-t $ Gebaeude_Hoehe / 100 + 1
scale_Bldg_Edges <-t $ Bldg_Edges / 100 + 1
scale_Bldg_Surface_wf <-t $ Bldg_Surface_wF / 100 + 1
scale_SHAPE_Idx_ISO <-t $ Shape_Idx_ISO / 100 + 1
scale_Num_Nb_100 <-t $ Num_Nb_100 / 100 + 1
scale_MBR_Orientation <- t $ MBR_Orientation / 100 + 1

scale_Gebaeude_Hoehe <-round (scale_Gebaeude_Hoehe, 2)
scale_Bldg_Surface_wf <- round (scale_Bldg_Surface_wf, 2)
scale_Bldg_Edges <- round (scale_Bldg_Edges, 2)
scale_Num_Nb_100 <- round (scale_Num_Nb_100,2)
scale_MBR_Orientation <- round (scale_MBR_Orientation, 2)
scale_SHAPE_Idx_ISO <- round (scale_SHAPE_Idx_ISO, 2)

scale_t <-cbind (scale_MBR_Orientation, scale_Num_Nb_100, scale_SHAPE_Idx_ISO, scale_Bldg_Surface_wf,
scale_Bldg_Edges, scale_Gebaeude_Hoehe)

write.csv2 (scale_t, "Warburg_scale.csv")
___________________________________________________________________________________________________________________________
Output str:
str (t)
'data.frame': 23668 obs. of 6 variables:
$ Building_Height: num 11.2 7.05 1.53 5.89 9.95 ...
$ Bldg_Edges: int 6 4 4 4 9 4 6 5 7 10 ...
$ Bldg_Surface_wF: num 246.3 81.8 51 149.5 612.6 ...
$ Shape_Idx_ISO: num 0.784 0.317 0.694 0.101 0.783 ...
$ Num_Nb_100: int 1 30 46 26 46 27 36 35 27 34 ...
$ MBR_Orientation: num 115.3 130.9 49.6 140.5 49.9 ...

___________________________________________________________________________________________________________________________
I have put a sample and a screenshot of the error message in the appendix.

I am thankful for every hint

Thank you and best regards

You do not have sufficient permissions to view the files attached to this post.