install.packages("UsingR")

library(UsingR)

x <- father.son$fheight

round(sample(x,10),1)

smallest <- floor(min(x))

largest <- ceiling(max(x))

values <- seq(smallest, largest, len = 300)

heightcdf <- ecdf(x)

plot(values, heightcdf(values), type="1",

xlab="a (Height in inches)", ylab = "Pr(x <= a)")

i have error; this " Error in plot.xy(xy, type, ...) : invalid plot type '1'"what can i do in this situation?