Displaying 6 results from an estimated 6 matches for "mysplit".
Did you mean:
mksplit
2012 Jun 06
3
problem about set operation and computation after split
...How to do a intersect operation among several groups in one list, without
a loop statement? (I think It may be a list)
create data:
myData <- data.frame(product = c(1,2,3,1,2,3,1,2,2),
year=c(2009,2009,2009,2010,2010,2010,2011,2011,2011),value=c(1104,608,606,1504,508,1312,900,1100,800))
mySplit<- split(myData,myData$year)
mySplit
$`2009`
product year value
1 1 2009 1104
2 2 2009 608
3 3 2009 606
$`2010`
product year value
4 1 2010 1504
5 2 2010 508
6 3 2010 1312
$`2011`
product year value
7 1 2011 900
8 2 2011 110...
2009 Dec 09
1
split() is slow on data.frame (PR#14123)
Please see the following code for the runtime comparison between
split() and mysplit.data.frame() (they do the same thing
semantically). mysplit.data.frame() is a fix of split() in term of
performance. Could somebody include this fix (with possible checking
for corner cases) in future version of R and let me know the inclusion
of the fix?
m=300000
n=6
k=30000
set.seed(0)
x=replic...
2009 Dec 09
1
split() is slow on data.frame (PR#14123)
Please see the following code for the runtime comparison between
split() and mysplit.data.frame() (they do the same thing
semantically). mysplit.data.frame() is a fix of split() in term of
performance. Could somebody include this fix (with possible checking
for corner cases) in future version of R and let me know the inclusion
of the fix?
m=300000
n=6
k=30000
set.seed(0)
x=replic...
2004 Jul 12
2
lme unequal random-effects variances varIdent pdMat Pinheiro Bates nlme
...qual variances is to apply an F-test for
equal variances to the random intercepts. If the data are as shown at the
bottom of this email, the test can be implemented as follows:
stuff<-as.data.frame(summary(mylme0)$coefficients$random$id)
stuff$sex<-factor(substring(row.names(stuff), 1,1))
mysplit<-split(stuff[,"(Intercept)"], stuff[,"sex"])
ns<-sapply(mysplit, length)
vars<-sapply(mysplit, var)
p<- 1-pf( vars["M"]/vars["F"], ns["M"]-1, ns["F"]-1)
Alternatively, one could implement a permutation test for the ratio of...
2008 Oct 13
2
split data, but ensure each level of the factor is represented
...s
> a<-c(3, 3, 3, 2, 3, 2, 2, 3, 2, 3)
> a
[1] 3 3 3 2 3 2 2 3 2 3
then split will return a list without a $`1`. I would like to have the
$`1` be a vector of 0's with the same length as the number of columns
in the dataset. In other words I want to write a function that returns
> mysplit(iris,a)
$`1`
[1] 0 0 0 0 0
$`2`
Sepal.Length Sepal.Width Petal.Length Petal.Width
4 4.6 3.1 1.5 0.2
6 5.4 3.9 1.7 0.4
7 4.6 3.4 1.4 0.3
9 4.4 2.9 1.4 0.2
$`3`...
2004 Jul 12
0
Where does R search when source() ?
...iances is to apply an F-test
for
| equal variances to the random intercepts. If the data are as shown at
the
| bottom of this email, the test can be implemented as follows:
|
| stuff<-as.data.frame(summary(mylme0)$coefficients$random$id)
| stuff$sex<-factor(substring(row.names(stuff), 1,1))
| mysplit<-split(stuff[,"(Intercept)"], stuff[,"sex"])
| ns<-sapply(mysplit, length)
| vars<-sapply(mysplit, var)
| p<- 1-pf( vars["M"]/vars["F"], ns["M"]-1, ns["F"]-1)
|
| Alternatively, one could implement a permutation test for the ra...