Displaying 1 result from an estimated 1 matches for "1au300".
Did you mean:
144300
2007 Nov 15
2
Normalizing data
...over the surface is not equal to one (I know since
some of the plots extend to numbers greater then 1). Is there a way to
normalize the data so the density function will actualy yield the
probability of x (a height in my case)?
This is my code so far:
#Input path
path <- "G:\\C\\Data txt\\1au300.txt"
#Dataverwerking
data <- read.table(path, header=TRUE)
rows <- length(data$height)
height <- data$height[1:rows]
dens <-density(height)
mean <- mean(height)
sd <- sd(height)
min <- min(hnorm)
max <- max(hnorm)
#Plot
par(new=FALSE)
curve(dnorm(x,m=mean,sd=sd),from...