[R] Order of terms in formula changes aov() results

2012-03-22 Thread Stuart Luppescu
4 1523 1406 Now obsid.f only has 3 degrees of freedom and the sum of squares is 0.00. Could this be due to the unbalanced design? If someone can explain this to me I would be very grateful. -- Stuart Luppescu -=- slu .at. ccsr.uchicago.edu University of Chicago

Re: [R] Need help with table() and apply()

2011-11-20 Thread Stuart Luppescu
. > > - attr(*, "dimnames")=List of 2 > > ..$ : NULL > > ..$ : chr [1:10] "rating.1" "rating.2" "rating.3" "rating.4" ... > >> > > > > notice it is just an integer array. > > > > Also if you h

[R] Need help with table() and apply()

2011-11-20 Thread Stuart Luppescu
eping the levels with 0 counts: $ rating.6 : 'table' int [1:4(1d)] 7 1 2 0 ..- attr(*, "dimnames")=List of 1 .. ..$ : chr [1:4] "1" "2" "3" "4" But I really want tables of the rows. Do I have to write my own function to count the numbers

Re: [R] Assignment working differently inside ifelse()

2011-08-16 Thread Stuart Luppescu
On Tue, 2011-08-16 at 12:10 -0500, Stuart Luppescu wrote: > but when I use the ifelse() as above, I get this: >[,1] [,2] [,3] [,4] > [1,] 0.0417 0.0417 0.0417 0.0417 > [2,] 0. 0. 0. 0. Oh, I see. ifelse

[R] Assignment working differently inside ifelse()

2011-08-16 Thread Stuart Luppescu
00 0. 0. Can anyone explain this to me? Also, is there an easier, less clumsy way to test for the existence of a row in a data frame? Thanks in advance. -- Stuart Luppescu -=- slu .at. ccsr.uchicago.edu University of Chicago -=- CCSR 才文と智奈美の父 -

[R] Stymied by plyr

2011-04-20 Thread Stuart Luppescu
ns but with no success. Can someone give me some pointers? Thanks. -- Stuart Luppescu -=- slu .at. ccsr.uchicago.edu University of Chicago -=- CCSR 才文と智奈美の父 -=- Kernel 2.6.36-gentoo-r5 Lars Strand: Will R run under Windows Pocket PC? Brian D. Ripley: We don't know! There are no binary ver

Re: [R] Ordering box plots

2011-01-24 Thread Stuart Luppescu
On Sun, 2011-01-23 at 17:37 -0600, Stuart Luppescu wrote: [snip] Thanks to Ben and Dennis for their help, but right after I sent the original message, I figured out how to solve my problem. I noticed that boxplot() contains the at= argument. To get the box locations, I used a line like this

[R] Ordering box plots

2011-01-23 Thread Stuart Luppescu
r. I even tried this: boxplot(meas.tab[,meas] ~ as.ordered(meas.tab$by.schl.plot.order) but that didn't do any better. I would think people would want to do this all the time. There must be an easy way to do it but I can't figure it out. Can anyone help me? -- Stuart Luppescu -=- slu .at. c

Re: [R] [semi-OT] Using fortune() in an email signature

2010-09-01 Thread Stuart Luppescu
simple, but thanks for writing anyway. -- Stuart Luppescu -=- slu .at. ccsr.uchicago.edu University of Chicago -=- CCSR 才文と智奈美の父 -=-Kernel 2.6.33-gentoo-r2 Have you ever wanted to write a book, but not known where to start? Now is a very good time to jump in, because the

[R] [semi-OT] Using fortune() in an email signature

2010-09-01 Thread Stuart Luppescu
producer); exit(EXIT_FAILURE); } Unfortunately, I don't understand this at all. Can anyone give me a clue as to what's happening? Thanks. -- Stuart Luppescu -=- slu .at. ccsr.uchicago.edu University of Chicago -=- CCSR 才文と

Re: [R] trajectory plot (growth curve)

2010-08-23 Thread Stuart Luppescu
le, entitled, "Fitting Value-added Models in R", by Harold Doran, is relevant and very useful and interesting. www-stat.stanford.edu/~rag/ed351longit/doran.pdf -- Stuart Luppescu -=- slu .at. ccsr.uchicago.edu University of Chicago -=- CCSR 才文と智奈美の父 -=-Kernel 2.6.33-gentoo-r2

Re: [R] which one give clear picture-pdf, jpg or tiff?

2010-08-20 Thread Stuart Luppescu
it > as from there. Woah. That's really involved. I use this little shell function to convert from ps to png: function ps2png { ps_file="$1" png_file=`echo "$ps_file" | sed -e 's/\.ps$/.png/'` gs -dQUIET -dNOPAUSE -dBATCH -sDEVICE=png16m -sOutputFi

Re: [R] offlist comment Re: KS Test question (2)

2010-08-05 Thread Stuart Luppescu
e of the most prolific, unselfish, and helpful contributors to this list. I often wonder how he finds time to post all these enlightening comments and do his own work. You would be better off to take advantage off his advice, and not spurn it. -- Stuart Luppescu -=- slu .at. ccsr.uchicago.edu

Re: [R] Multilevel IRT Modelling

2010-07-14 Thread Stuart Luppescu
the Journal of Statistical Software focusing on psychometrics in R. It has a lot of valuable information. http://www.jstatsoft.org/v20 -- Stuart Luppescu -=- slu .at. ccsr.uchicago.edu University of Chicago -=- CCSR 才文と智奈美の父 -=-Kernel 2.6.33-gentoo-r2 To paraphrase provocati

Re: [R] How to determine if R is 64 bit compiled under Unix-alike?

2010-07-05 Thread Stuart Luppescu
em? If you can find the object files, you can test them with file as before, for example: file /usr/lib64/R/library/MASS/libs/MASS.so /usr/lib64/R/library/MASS/libs/MASS.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped -- Stuart Luppescu -=- slu .at. ccsr.uc

Re: [R] How to determine if R is 64 bit compiled under Unix-alike?

2010-07-05 Thread Stuart Luppescu
which is /usr/lib64/R/bin/exec/R (don't know if this is the same in Ubuntu). File then gives: file /usr/lib64/R/bin/exec/R /usr/lib64/R/bin/exec/R: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped -- Stuart Luppescu -*-

Re: [R] Conditionally constructing columns in a data frame

2010-06-29 Thread Stuart Luppescu
06.0448 -6.98104 1.02349 0.65789 NANA NANA 100 524 215.9634 2.93754 0.37856 0.01297 NANA NA NA 100 -- Stuart Luppescu University of Chicago __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/l

[R] Conditionally constructing columns in a data frame

2010-06-29 Thread Stuart Luppescu
ead100, read110, read111) Isn't there an easier way to do this? Thanks. -- Stuart Luppescu University of Chicago __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.

Re: [R] help in function in R akin to macro in SAS

2010-04-06 Thread Stuart Luppescu
e("Supervised: Mapping plot for", data) > > } > > > #use the plotxyf function. > plotxyf(final.xyf) BTW, I think it's better not to use "data" as a function parameter, since it has reserved use in the language. -- Stuart Luppe

Re: [R] SAS and R on multiple operating systems

2010-04-05 Thread Stuart Luppescu
d by ess under emacs. You can get the same thing with R in ess by highlighting the code and pressing C-c C-r (or C-c C-b to run the whole program). -- Stuart Luppescu University of Chicago __ R-help@r-project.org mailing list https://stat.ethz.ch/ma

[R] BATCH jobs taking too much resources?

2010-04-01 Thread Stuart Luppescu
right around 1.0. Admittedly, this is a rather big job: lmer with 2,200,000 records crossed by 125,000 students and 10,000 teachers. But I don't understand why it should consume resources so avariciously when run as a BATCH job. Can anyone explain this to me? TIA -- Stuart Luppescu -*-*- slu ccsr

Re: [R] help R IRT simulation

2010-03-03 Thread Stuart Luppescu
and rnorm() doesn't include arguments for skewness and kurtosis. kurtosis() functions exist in e1071 and fUtilities, but they only return the kurtosis of the input data. Let me know if you find something. -- Stuart Luppescu University of Chicago __

[R] Omitting members of a sequence

2010-02-19 Thread Stuart Luppescu
? > 64:70[-c(2, 4)] [1] 64 65 66 67 68 69 70 Just wondering. -- Stuart Luppescu -=- slu .at. ccsr.uchicago.edu University of Chicago -=- CCSR 才文と智奈美の父 -=-Kernel 2.6.30-gentoo-r5 Cordelia: Hi! You having fun? Angel: Sure. This is, uh... Cordelia: Your idea of hell.