similar to: How to use tapply with more than one variables grouped

Displaying 20 results from an estimated 1200 matches similar to: "How to use tapply with more than one variables grouped"

2009 Nov 01
4
convert list to Dataframe
Hi. I have a huge list called twitter: > dim(twitter) NULL > str(twitter) List of 1 $ :Classes 'PlainTextDocument', 'TextDocument', 'character' atomic [1:35575] 11999;10:47:14;20;10;2009;ObamaLouverture;Trails Mixed Lessons For Governance From Campaigner-in-chief: President obama jumps campaign 09 tuesday..
2009 May 22
1
Confirmatory factor analysis problems using sem package (works in Amos)
Hello all, I'm trying to replicate a confirmatory factor analysis done in Amos. The idea is to compare a one-factor and a two-factor model. I get the following warning message when I run either model: "Could not compute QR decomposition of Hessian. Optimization probably did not converge." I have no idea what to do here. I believe posters reported the same problem. It seems
2009 Jan 28
2
For Whom the Gaza Bell Tolls -- Part 1 and 2 -- Obama’s Mideast Jewish Wet Dream Team
For Whom the Gaza Bell Tolls -- Part 1 By Edmund Connelly for The Occidental Observer January 16, 2008 ?The Israelis can kill whomever they want whenever they want.? --Paul Craig Roberts I sometimes think that it?s pointless for Americans to talk much about recent events in Gaza because we know how it will play out ? America will do absolutely nothing to interfere with the ongoing massacre.
2012 Jan 08
2
cannot find package in Packages>>Install Packages
Hi. I am trying to install a package called DMwR http://cran.r-project.org/web/packages/DMwR/index.html located here: http://cran.r-project.org/bin/windows/contrib/r-release/DMwR_0.2.1.zip on windows 7. I am using R 2.10.1. I also tried typing something like this but it did not work well. install.packages(c(" http://cran.r-project.org/bin/windows/contrib/r-release/DMwR_0.2.1.zip
2009 Jan 28
2
For Whom the Gaza Bell Tolls -- Part 1 and 2 -- Obama’s Mideast Jewish Wet Dream Team
For Whom the Gaza Bell Tolls -- Part 1 By Edmund Connelly for The Occidental Observer January 16, 2008 ?The Israelis can kill whomever they want whenever they want.? --Paul Craig Roberts I sometimes think that it?s pointless for Americans to talk much about recent events in Gaza because we know how it will play out ? America will do absolutely nothing to interfere with the ongoing massacre.
2010 Aug 28
1
Matchspy and faceting
Have been working recently on a site that classifies posts using tags in taxonomies, so a post about the Oil spill in the Gulf of Mexico might be tagged 'Subscribers only' (access level), 'Barack Obama' (person), 'Tony Hayward' (person), 'BP' (company), 'Transocean' (company), 'Gulf of Mexico' (location). With some advice from Richard Boulton I
2013 Apr 05
2
How to perform a grouped shapiro wilk test on dataframe
Hello, I was wandering if it is possible to perform on a dataframe called 'all' a shapiro wilk normality test for COUNTS by variable Group ACTIVITY? Could it be done using plyer? I saw an eg that applies to an array but not to a dataframe: lapply(split(dataset1$Height,dataset1$Group),shapiro.test) Any thoughts would be much appreciated. My dataframe is in shape: dat ACTIVIT
2013 Jan 07
2
how to aggregate T-test result in an elegant way?
Dear all: Plan 1: I want to do serval t-test means for different variables in a loop , so I want to add all results to an object then dump() them to an text. But I don't know how to append T-test result to the object? I have already plot the barplot and I want to know an elegant way to report raw result. Can anybody give me some pieces of advice? Yao He ????????????????????????? Master
2004 Jun 01
1
swapping with data.frame
Hi there, I have some data which are convenient to enter as lists. For example: t1<-list(fname="animal1",testname="hyla",dspkr="left",res1=39.7,res2=15.0) t2<-list(fname="animal1",testname="bufo",dspkr="left",res1=14.4,res2=56.1)
2013 Nov 21
1
how can I import a number of datsets in a folder in my working directory to a list in R
Hi, Suppose, if I create 15 files in my working directory. set.seed(48) lapply(1:15,function(i) {m1 <- matrix(sample(1:20,1686*2,replace=TRUE),nrow=1686,ncol=2); write.table(m1,paste0("file_",i,".txt"),row.names=FALSE,quote=FALSE)}) ?D <-dir() D1 <- D[order(as.numeric(gsub("\\D+","",D)))] D1 ?res <- t(sapply(D1,function(x) {x1<-
2012 May 27
3
write.csv permissions
Dear R help, I have a doubt regarding the write.csv function.? When I save a file (write.csv(res1,"res1.csv")), it is saving with the read-only permission.? I tried to change the permission as a root user with chmod u+x.? Though, it says that "-rwxr--r--? 1 root root???? 164 2012-05-27 10:18 res1.csv", when I open the file it is still read-only.? Is there any way to save the
2013 Feb 17
6
histogram
HI Elisa, You could use ?cut() vec1<-c(33,18,13,47,30,10,6,21,39,25,40,29,14,16,44,1,41,4,15,20,46,32,38,5,31,12,48,27,36,24,34,2,35,11,42,9,8,7,26,22,43,17,19,28,23,3,49,37,50,45) label1<-unlist(lapply(mapply(c,lapply(seq(0,45,5),function(x) x),lapply(seq(5,50,5),function(x) x),SIMPLIFY=FALSE),function(i) paste(i[1],"<x<=",i[2],sep="")))
2006 Aug 18
1
multivariate analysis by using lme
Dear R users, I have a data structure as follows: id two res1 res2 c1 c2 inter 1 -0.786093166 1 0 1 2 6 3 -0.308495749 1 0 0 1 2 5 -0.738033048 1 0 0 0 1 7 -0.52176252 1 0
2013 May 07
4
how to calculate the mean in a period of time?
Hi, Your question is still not clear. May be this helps: dat2<- read.table(text=" patient_id????? t???????? scores 1????????????????????? 0??????????????? 1.6 1????????????????????? 1??????????????? 2.6 1????????????????????? 2???????????????? 2.2 1????????????????????? 3???????????????? 1.8 2????????????????????? 0????????????????? 2.3 2?????????????????????? 2???????????????? 2.5
2012 Jan 04
1
function in R for my exercise
Hi R helpers! I have a question. I'm trying to create a function for an exercise. Here are the arguments I should include: x and y are numeric z is a name ("plus","minus","multiply","divide") and swap is logical. Here is what the function should do: When z="plus", then x+y is performed and so on for the other z names. It should give a NA
2011 Apr 05
2
IFELSE function XXXX
Hello everyone, This IFELSE function call is not working properly. I do not receive an error message, but the actions are not executed conditional as I was hoping. Any assistance is appreciated. set.seed(12345) res1<-rbinom(10000,1,.1) rdata3<-transform(data.frame(res1),input1=rnorm(10000,50,10)) data3 #inducing correlation between res1 & input1
2005 Jul 19
1
initial points for arms in package HI
Dear R-users I have a problem choosing initial points for the function arms() in the package HI I intend to implement a Gibbs sampler and one of my conditional distributions is nonstandard and not logconcave. Therefore I'd like to use arms. But there seem to be a strong influence of the initial point y.start. To show the effect I constructed a demonstration example. It is reproducible
2003 Aug 21
4
anova(lme object)
Hi, I use lme to fit models like R> res1 <- lme(y~A+B, data=mydata, random=~1|subject) R> res2 <- lme(y~B+A, data=mydata, random=~1|subject) (only difference between these two models are the sequence in which the indep variables are written in formula) where y is continuous and A, B, and subject are factors. To get ANOVA table I used R> anova(res1) R> anova(res2) and found
2012 Oct 26
3
regression analysis in R
Dear useRs, i have vectors of about 27 descriptors, each having 703 elements. what i want to do is the following 1. i want to do regression analysis of these 27 vectors individually, against a dependent vector, say B, having same number of elements.2. i would like to know best 10 regression results, if i do regression analysis of dependent vector against the random combination of any 4
2013 Sep 25
1
Computing calculation among two vectors
Hi, Try: x<- 1:4 ?y<- c("*","/","-","+") res<-sapply(y,function(i) {x1<-expand.grid(x,x); unlist(lapply(paste0(x1[,1],i,x1[,2]),function(u) eval(parse(text=u))))}) row.names(res)<- as.character(interaction(expand.grid(x,x),sep="_")) head(res) #??? *?? /? - + #1_1 1 1.0? 0 2 #2_1 2 2.0? 1 3 #3_1 3 3.0? 2 4 #4_1 4 4.0? 3 5 #1_2 2 0.5