search for: datafrmae

Displaying 3 results from an estimated 3 matches for "datafrmae".

Did you mean: dataframe
2009 Feb 12
0
Comparing slopes in two linear models
...se places (Local=='Palm') is biased by low numbers and will yield slower slopes in the variance-mean regression over the areas. I wonder if these slopes are diferents. I've looked trought the support list for methods for comparing slopes and found the three explained above: #d - whole datafrmae d$Local <- as.factor(d$Local) dHT <- subset(d, Local!='Palm') dP <- subset(d, Local!='Palm') 1 - Single dataframe procedure: fit1 <- lm(log(varCDI) ~ Local + I(log(CDI)) + Local:I(log(CDI)), data=d) fit2 <- lm(log(varCDI) ~ Local + I(log(CDI)) + Local:I(log(CDI)),...
2010 Sep 06
3
Aggregate certain rows in a matrix
Hi, I have a matrix that looks like this a <- c(1,1,1,1,2,2,3,3,3,3) b <- c(2,2,2,3,4,4,4,5,5,6) c <- c(1,2,3,4,5,6,7,8,9,10) M <- matrix(nr=10,nc=3) M[,1] <- a M[,2] <- b M[,3] <- c > M [,1] [,2] [,3] [1,] 1 2 1 [2,] 1 2 2 [3,] 1 2 3 [4,] 1 3 4 [5,] 2 4 5 [6,] 2 4 6 [7,] 3 4 7
2013 Apr 12
3
Why copying columns of a data.frame becomes numeric?
Dear list, I want the 1st, 2nd, 5th, and 6th columns of mtcars. After copying them, the columns become numeric class rather than data frame. But, when I copy rows, they data frame retains its class. Why is this? I don't see why copying rows vs columns is so different. > class(mtcars) [1] "data.frame" > head(mtcars) mpg cyl disp hp drat wt qsec vs