similar to: how to extract the row names of a matrix using for loop or otherlooping

Displaying 20 results from an estimated 1000 matches similar to: "how to extract the row names of a matrix using for loop or otherlooping"

2005 Dec 10
1
how to extract the row names of a matrix using for loop or other looping
Hi all, I have a matrix and its cluster...and i like to extract the row names of each cluster....but using the for loop or some other looping a<-matrix(c(seq(3,45,3),seq(10,6,-1)),4,5,byrow=F) col<-c("ra","rb","rc","rd","re") rows<-c("ca","cb","cc","cd") dimnames(a)<-list(rows,col) a
2005 Jul 26
0
Association rules
>library(foreign) in the foreign package,you can use read.csv command to read the csv file.you can use excel to open the file and save as cvs file.you should read the manuals first,which tells in details how to import your data into R. before you use the command frome the arules package,you should first type the command >library(arules) ======= 2005-07-26 22:18:48 伳侜佋佢伬伌佇伵佒佇佇伌伒伬仯伜=======
2005 Dec 06
7
R is GNU S, not C.... [was "how to get or store ....."]
======= 2005-12-06 22:16:17 伳侜佋佢伬伌佇伵佒佇佇伌伒伬仯伜======= >Martin Maechler a 侀crit : > >> please, please, these trailing ";" are *so* ugly. >> This is GNU S, not C (or matlab) ! >> >> but I'll be happy already if you could >> drop these ugly empty statements at the end of your lines... > >May I disagree ? >I find missing ";" at
2005 Nov 27
2
multilevel models and sample size
It is not a pure R question,but I hope some one can give me advices. I want to use analysis my data with the multilevel model.The data has 2 levels---- the second level has 52 units and each second level unit has 19-23 units.I think the sample size is quite small,but just now I can't make the sample size much bigger.So I want to ask if I use the multilevel model to analysis the data set,will
2005 Oct 23
1
question about technieque do with large computation
The green book tells:"The basic technique is classic :keep it simple ."A long ,complicated expression or function is less fravorable than" a relatively small computations that combines calls to a few other functions to perform its tasks." But I don't get the point totally.Can anyone give me an example to make me understand this rules totally? ps: Is it mean that f1 is
2005 Oct 15
2
how to import such data to R?
the data file has such structure: 1992 6245 49 . . 20 1 0 0 8.739536 0 . . . . . . . . "alabama" . 0 . 1993 7677 58 . . 15 1 0 0
2005 Oct 14
1
question about ?list
the help page says: 'is.list' returns 'TRUE' iff its argument is a 'list' _or_ a 'pairlist' of 'length' > 0, whereas 'is.pairlist' only returns 'TRUE' in the latter case. does the "latter case" mean a 'pairlist' of 'length' > 0? but > is.pairlist(pairlist()) [1] TRUE > length(pairlist())
2005 Oct 21
1
The behavior of match function
> x<-1:10 > y<-x+1e-20 > x [1] 1 2 3 4 5 6 7 8 9 10 > y [1] 1 2 3 4 5 6 7 8 9 10 > identical(x,y) [1] FALSE > match(x,y) [1] 1 2 3 4 5 6 7 8 9 10 What's the principle the function use to determine if x match y? Thank you! 2005-10-21 ------ Deparment of Sociology Fudan University My new mail addres is ronggui.huang at gmail.com
2005 Dec 12
0
how to import the large SPSS data file into R?
I have a spss format data file which is about 134M,and I want to read it into R and analysis the data. I plan to split the file into 4 parts and then use read.spss to read it,but during the process,the RGui crashes. and I try to convert it into csv file and use read.csv to import it,but after 1 hours,the process is still not completed. So I want to know if my computer can do this job without
2005 Nov 18
2
about eval and eval.parent
x<-1 f<-function(){ x<-3 eval(substitute(x+y,list(y=10))) } f() #13 x<-1 f<-function(){ x<-3 eval(substitute(x+y,list(y=10)), envir = sys.frame(sys.parent())) } f() #11 x<-1 f<-function(){ x<-3 eval.parent(substitute(x+y,list(y=10))) } f()#11 the help page says: "If 'envir' is not specified, then 'sys.frame(sys.parent())', the
2005 Dec 15
1
bug?
> library(foreign) > da<-read.dta(file.choose()) > da startdat starttim enddate endtime days hoursmin secused 1 2005-01-11 2 2005-12-15 20.19 NA NA 9 > attributes(da) $datalabel [1] "Example of use of date and time functions" $time.stamp [1] "15 伿伄伓侢佋伮 2005 20" $names [1] "startdat" "starttim"
2005 Dec 12
3
question about date's
Hi, Given a frame with calendar date's: "2005-07-01", "2005-07-02","2005-07-03","2005-07-04","2005-07-05",etc. I want to extract the following from these dates: week number month number year number Any ideas how to accomplish this? Many thanks. Regards, Richard
2005 Dec 13
2
what does this warnings mean? and what should I do?
I use lmer to fit a mixed effect model.It give some warnings.what does this warnings mean? and what should I do? > (fm2.mlm <- lmer(qd ~ edu + jiankang + peixun +hunyin + cadcj + age + age2 + sex + dangyuan + Comp.1 + Comp.2+trust.cz1 +(trust.cz1|commid), data = individual,na.action = "na.exclude",family="quasibinomial")) Generalized linear mixed model fit using PQL
2005 Jun 09
2
can nlme do the complex multilevel model?
data from multilevel units,first sample the class ,and then the student in calss.following is the 2-level model. and the level-1 model deals with the student,and the level-2 model deals with the class level the students belong to. Level-1 Model Y = B0 + B1*(ZLEAD) + B2*(ZBUL) + B3*(ZSHY) + R Level-2 Model B0 = G00 + U0 B1 = G10 + G11*(ZWARMT) + U1 B2 = G20 + G21*(ZWARMT) + G22*(ZABLET) +
2005 Aug 06
1
oldClass vs. class
Hi,When I read the source of str,i find these code ----- ## Show further classes // Assume that they do NOT have an own Method -- ## not quite perfect ! (.Class = 'remaining classes', starting with current) cl <- oldClass(object); cl <- cl[cl != "data.frame"] #- not THIS class ----- so I use ?oldClass to try to learn more about oldClass.But after I have reading
2005 Oct 18
2
The meaning of functional language
It's often heard that the S language is a functional language.But What's the exact meaning of this termology in the context of S language? 2005-10-18 ------ Deparment of Sociology Fudan University Blog:http://sociology.yculblog.com
2004 Jun 30
1
Developing functions
Without trying to understand your code in detail let me just assume you are trying to create a matrix, ret, whose i,j-th entry is some function, f, of row i of X and row j of X. In that case this should do it: apply(X,1,function(x)apply(X,1,function(y)f(x,y))) Date: Wed, 30 Jun 2004 15:28:47 -0300 (ART) From: <daniel at sintesys.com.ar> To: <r-help at stat.math.ethz.ch>
2005 Jun 13
5
slow loading with lme4
it takes a long time to load the lme4 package.anyone else encounter this problem? > system.time(library(lme4)) 佋佖伻侂佇佽佉仾伒伳伋佁伡伃伆侟仯伜Matrix 佋佖伻侂佇佽佉仾伒伳伋佁伡伃伆侟仯伜lattice [1] 19.90 0.30 25.56 NA NA > version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status Patched major 2 minor
2005 Jun 20
1
error when installing Matrix
> version _ platform i386-pc-linux-gnu arch i386 os linux-gnu system i386, linux-gnu status major 2 minor 1.0 year 2005 month 04 day 18 language R OS:debian linux # R CMD INSTALL /home/ronggui/Matrix_0.96-3.tar.gz ......... s-3 -L/usr/lib/R/lib -lR /usr/bin/ld: cannot find -lblas-3 collect2: ld returned 1 exit status make: *** [Matrix.so] Error 1
2005 Aug 03
1
Multilevel logistic regression using lmer vs glmmPQL vs.gllamm in Stata
>On Wed, 3 Aug 2005, Bernd Weiss wrote: > >> I am trying to replicate some multilevel models with binary outcomes >> using R's "lmer" and "glmmPQL" and Stata's gllmm, respectively. > >That's not going to happen as they are not using the same criteria. the glmmPQL and lmer both use the PQL method to do it ,so can we get the same result by