Displaying 1 result from an estimated 1 matches for "micsh".
Did you mean:
micah
2012 Apr 16
2
Problems with subset, droplevels and lm: variable lengths differ
...slo[,"site"])
>
> # log transform the chemical elements
> Oslo[,8:14] <- log(Oslo[,8:14])
>
> # delete cases with missing data
> Oslo <- Oslo[complete.cases(Oslo),]
> nrow(Oslo)
[1] 350
>
> # delete low frequency litho=="GNEID_O" | "MICSH"
> Oslo <- subset(Oslo, !litho %in% c("GNEID_O", "MICSH"), drop=TRUE)
> nrow(Oslo)
[1] 332
> Oslo<- droplevels(Oslo)
> table(Oslo$litho)
CAMSED GNEIS_O GNEIS_R MAGM
98 89 32 113
> nrow(Oslo)
[1] 332
> mod1 <- lm(cbi...