Re: [R] quick question about lme()

2012-04-15 Thread YA
Hi Thierry, Thank you very much. Best regards, YA On 2012-4-15 1:06, ONKELINX, Thierry wrote: Both specifications are the same model. An intercept is added by default unless you use +0 or -1 like ~0 + LEAD|GRP or ~ -1 + LEAD|GRP Van:

Re: [R] Sending lists from R to C using .C

2012-04-15 Thread Prof Brian Ripley
On 15/04/2012 05:22, chris90nz wrote: Hi, I am currently stuck on the following problem: I have a matrix where each element is a list of numbers of differing lengths. I am wondering what would be the best way to send this to my C function using .C? Follow the documentation This is not

Re: [R] basic question predict GLM offset

2012-04-15 Thread peter dalgaard
On Apr 15, 2012, at 01:37 , David Winsemius wrote: On Apr 14, 2012, at 6:47 PM, smfa wrote: Hi, I know this is probably a basic question... But I don't seem to find the answer. I'm fitting a GLM with a Poisson family, and then tried to get a look at the predictions, however the

[R] match values from data.frame and vector

2012-04-15 Thread Omphalodes Verna
Dear R helpers! I have a vector 'x1' and data.frame 'df1'. Do you have any suggestion how to get vector x2, which will be a result of matching values from vector 'x1' and values from 'df1'? Please, see the example: x1 - c(rep(1,3), rep(NA,2), rep(2,4)) df1 - data.frame(c1 = c(1,2), c2 =

Re: [R] How to rank vectors based on their elements?

2012-04-15 Thread Manish Gupta
Thanks for your reply. But the classes are having weighht vectors? so we know alredy each elelment (here 5) has their own signicance which is shown by negative and positive values. But i need to use this data to rank them. Regards -- View this message in context:

Re: [R] match values from data.frame and vector

2012-04-15 Thread peter dalgaard
On Apr 15, 2012, at 09:36 , Omphalodes Verna wrote: Dear R helpers! I have a vector 'x1' and data.frame 'df1'. Do you have any suggestion how to get vector x2, which will be a result of matching values from vector 'x1' and values from 'df1'? Please, see the example: x1 - c(rep(1,3),

Re: [R] simple read in with zoo using POSIXlt

2012-04-15 Thread Achim Zeileis
On Sat, 14 Apr 2012, knavero wrote: Achim Zeileis-4 wrote You just need to declare that the index is in two columns (1 and 2) and then provide a function that extracts a suitable object from it: read.zoo(test.txt, header = FALSE, index = 1:2, FUN = function(x, y) strptime(paste(x, y),

[R] Sweave compiling problem

2012-04-15 Thread Riccardo Romoli
Hi, I' a newbie in Debian (I came from OsX) and I notice this error compiling a Sweave document after I installed the last R relese (2.15.0): Error in driver$finish(drobj) : the output file 'MyDocument.tex' has disappeared Calls: Anonymous - do.call - Anonymous - Anonymous Execution halted Do

[R] Specifying splits - in read.csv.ffdf

2012-04-15 Thread Indrajit Sengupta
Hi All,   I am currently trying to familiarize with ff package which allows me to store R objects in the hard drive. One of things that I notice when reading in a text file with read.csv.ffdf function - is that, in the R temp folder, 1000+ small files get created, each file having a name like

Re: [R] How to rank vectors based on their elements?

2012-04-15 Thread Petr Savicky
On Sat, Apr 14, 2012 at 07:10:48PM -0700, Manish Gupta wrote: Hi, I am working on ranking algo? I have data which is in the form of vectors (feature) for each class and i need to rank them based on feature vector. class1-c(1,3,4,-2,0) class2-c(2,0,0,-3,0) class3-c(2,3,1,4,5)

Re: [R] Sweave UFT8 problem

2012-04-15 Thread Philippe Grosjean
Hello, Have you tried to put that command in a comment: %\usepackage[utf8]{inputenc} I haven't tested it in this particular case, but it works in some other situations. Best, Philippe ..¡})) ) ) ) ) ) ( ( ( ( (Prof. Philippe Grosjean

Re: [R] Sweave UFT8 problem

2012-04-15 Thread Prof. Dr. Matthias Kohl
try: Sweave(sim_pi.Rnw, encoding = utf8) Best, Matthias On 15.04.2012 11:41, Philippe Grosjean wrote: Hello, Have you tried to put that command in a comment: %\usepackage[utf8]{inputenc} I haven't tested it in this particular case, but it works in some other situations. Best, Philippe

[R] xyplot type=l

2012-04-15 Thread Eiko Fried
Probably a stupidly simple question, but I wouldn't know how to google it: xyplot(neuro ~ time | UserID, data=data_sub) creates a proper plot. However, if I add type = l the lines do not go first through time1, then time2, then time3 etc but in about 50% of all subjects the lines go through

[R] GLM other machine learning packages for ffdf formats

2012-04-15 Thread Indrajit Sengupta
Hi All,   I have 1 GB dataset in ffdf format. Is there any package / machine learning algorithms available that I can apply on these ffdf format datasets?   Regards, Indrajit [[alternative HTML version deleted]] __ R-help@r-project.org mailing

Re: [R] How to rank vectors based on their elements?

2012-04-15 Thread Manish Gupta
Hi, In my case, your first guess is right. I need to rank classes based on their feature vector. 1 3 4 -2 0 class1 2 0 0 -3 0 class2 2 3 1 4 5 class3 -4 -5 1 0 0 class4 Like class1 class3 class4 class2 How can i implement it? Regards -- View

Re: [R] How to rank vectors based on their elements?

2012-04-15 Thread Petr Savicky
On Sun, Apr 15, 2012 at 02:52:11AM -0700, Manish Gupta wrote: Hi, In my case, your first guess is right. I need to rank classes based on their feature vector. 1 3 4 -2 0 class1 2 0 0 -3 0 class2 2 3 1 4 5 class3 -4 -5 1 0 0 class4

Re: [R] master thesis

2012-04-15 Thread Steven Wolf
Try the pairs() function to explore your raw data. This webpage may even give you a nice way to visualize your data: http://r-epid.blogspot.com/2008/11/correlation-pairs-plot.html -Steve -Original Message- From: Francesca Sorbie [mailto:fsor...@hotmail.com] Sent: Saturday, April 14,

Re: [R] xyplot type=l

2012-04-15 Thread David Winsemius
On Apr 15, 2012, at 6:19 AM, Eiko Fried wrote: Probably a stupidly simple question, but I wouldn't know how to google it: xyplot(neuro ~ time | UserID, data=data_sub) creates a proper plot. However, if I add type = l the lines do not go first through time1, then time2, then time3 etc

[R] [R-pkgs] version 3.0-0 of the sem now on CRAN

2012-04-15 Thread John Fox
Dear R users, Version 3.0-0 of the sem package is now on CRAN. From the package NEWS file: o Compiled code for optimization. o Added multi-group models. o Modification indices for equality-constrained parameters. o weights argument added

Re: [R] Question with R CMD SHLIB in 64 bit R

2012-04-15 Thread Uwe Ligges
On 14.04.2012 21:53, Katharine Miller wrote: OK. So, I have 64 bit Windows 7 and I have installed R 2.15.0 Yes, and have you also installed version 2.15 of the Rtools? Uwe ligges Thanks 2012/4/14 Uwe Liggeslig...@statistik.tu-dortmund.de On 14.04.2012 19:01, Katharine Miller

Re: [R] xyplot type=l

2012-04-15 Thread Peter Ehlers
On 2012-04-15 03:19, Eiko Fried wrote: Probably a stupidly simple question, but I wouldn't know how to google it: xyplot(neuro ~ time | UserID, data=data_sub) creates a proper plot. However, if I add type = l the lines do not go first through time1, then time2, then time3 etc but in about 50%

Re: [R] xyplot type=l

2012-04-15 Thread David Winsemius
On Apr 15, 2012, at 11:54 AM, Peter Ehlers wrote: On 2012-04-15 03:19, Eiko Fried wrote: Probably a stupidly simple question, but I wouldn't know how to google it: xyplot(neuro ~ time | UserID, data=data_sub) creates a proper plot. However, if I add type = l the lines do not go first

Re: [R] xyplot type=l

2012-04-15 Thread Peter Ehlers
On 2012-04-15 09:31, David Winsemius wrote: On Apr 15, 2012, at 11:54 AM, Peter Ehlers wrote: On 2012-04-15 03:19, Eiko Fried wrote: Probably a stupidly simple question, but I wouldn't know how to google it: xyplot(neuro ~ time | UserID, data=data_sub) creates a proper plot. However, if I

Re: [R] Question with R CMD SHLIB in 64 bit R

2012-04-15 Thread Katharine Miller
Yes. I have version 2.15.0 of Rtools as well. I went ahead and re-installed both R and Rtools just to make sure everything was OK. But that did not fix the problem. - Katharine 2012/4/15 Uwe Ligges lig...@statistik.tu-dortmund.de On 14.04.2012 21:53, Katharine Miller wrote: OK. So, I

Re: [R] Choose between duplicated rows

2012-04-15 Thread francy
Thank you very much to both your replies. Trinker's solution works great for small dataset, but the 'split' function just hangs when I try to apply it to all my data (around 9,000 rows)…Has anyone encountered this problem before, and do you know what I could try? Thanks again. -- View this

[R] correct implementation of a mixed-model ANOVA in R

2012-04-15 Thread Jokel Meyer
Dear R-experts! I having trouble with the correct implementation of a mixed-model ANOVA in R. I my dataset subjects were tested in a cognitive performance test (numerical outcome variable 'score'). This cognitive performance test is devided into five blocks (categorical factor 'block'). All

Re: [R] simple read in with zoo using POSIXlt

2012-04-15 Thread knavero
Thanks Gabor. Much appreciated. -- View this message in context: http://r.789695.n4.nabble.com/simple-read-in-with-zoo-using-POSIXlt-tp4557138p4559762.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] simple read in with zoo using POSIXlt

2012-04-15 Thread knavero
Achim Zeileis-4 wrote I don't know why you make this so complicated. Either use read.zoo(test.txt, header = FALSE, sep = \t, format = %d/%m/%Y %H:%M, tz = ) which yields a POSIXct time index. Alternatively, you can produce POSIXlt via strptime: read.zoo(test.txt, header = FALSE,

Re: [R] (no subject)

2012-04-15 Thread Fino Fontana
Thanks David, for helping out. Works great. A question about your added lines of code: with opar - par(mar=c(8,3,2,2)) your are setting the margins, and you store them in opar next,  par(opar) does nothing, I think because it just sets the same margins again. shouldn't this be something like

Re: [R] Choose between duplicated rows

2012-04-15 Thread francy
I also tried using Jim's code, but it doesn't work as expected with my real dataset. This is what I did: Best.na - do.call(rbind, lapply(split(x, x$A), function(.grp){ best - which.min(apply(.grp, 1, function(a) sum(is.na(a .grp[best, ] })) df.split - split(Best.na,

Re: [R] (no subject)

2012-04-15 Thread David Winsemius
On Apr 15, 2012, at 4:18 PM, Fino Fontana wrote: Thanks David, for helping out. Works great. A question about your added lines of code: with your are setting the margins, and you store them in opar next, par(opar) does nothing, I disagree (and you offer no counter-examples, as would

Re: [R] caret package: custom summary function in trainControl doesn't work with oob?

2012-04-15 Thread Matthew Francis
Hi Max, Thanks for your help. In the case of randomForest, the keyword keep.inbag=TRUE in the train function provokes the return the information about which data rows were in-bag in each tree. That should provide the required info to re-compute the OOB error for any given alternative error

[R] Approximately how big is an installation of all packages.

2012-04-15 Thread Keith Weintraub
Folks, If you know the answer great. If you can tell me which command to use to find out that information please let me know. If this is the wrong forum, my apologies. Thanks, KW -- [[alternative HTML version deleted]] __

[R] CRAN (and crantastic) updates this week

2012-04-15 Thread Crantastic
CRAN (and crantastic) updates this week New packages * disclapmix (0.1) Maintainer: Mikkel Meyer Andersen Author(s): Mikkel Meyer Andersen and Poul Svante Eriksen License: GPL-2 http://crantastic.org/packages/disclapmix disclapmix makes inference in a mixture of Discrete

[R] Problems loading siar package

2012-04-15 Thread Gary Roemer
Hello, I recently bought a new Macbook Pro and installed R via a disk image from an older computer - it seems to work fine. I then installed the package siar, tried to load it via the library command and received the following messages (note the mvtnorm package did not appear to load correctly):

[R] correct standard errors (heteroskedasticity) using survey design

2012-04-15 Thread jour4life
Hello all, I'm hoping someone can help clarify how the survey design method works in R. I currently have a data set that utilized a complex survey design. The only thing is that only the weight is provided. Thus, I constructed my survey design as: svdes-svydesign(id=~1, weights=~weightvar,

[R] Issue with xxx-package.Rd

2012-04-15 Thread Lars Bishop
Dear list, I have an issue with placing the information stored in the file mypackage-package.Rd file (as created by promptPackage(mypackage)) in the package manual pdf file. The information on that .Rd file is not placed in the head of the manual as I would expect. I think a possible reason is

Re: [R] Problems loading siar package

2012-04-15 Thread Gary Roemer
PS The version of siar on my old computer is 4.0, the new version is 4.1.3 - could the latter be corrupt? Thanks, Gary -- View this message in context: http://r.789695.n4.nabble.com/Problems-loading-siar-package-tp4560105p4560125.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Issue with xxx-package.Rd

2012-04-15 Thread Duncan Murdoch
On 12-04-15 7:39 PM, Lars Bishop wrote: Dear list, I have an issue with placing the information stored in the file mypackage-package.Rd file (as created by promptPackage(mypackage)) in the package manual pdf file. The information on that .Rd file is not placed in the head of the manual as I

Re: [R] simple read in with zoo using POSIXlt

2012-04-15 Thread Gabor Grothendieck
On Sun, Apr 15, 2012 at 3:45 PM, knavero knav...@gmail.com wrote: Achim Zeileis-4 wrote I don't know why you make this so complicated. Either use read.zoo(test.txt, header = FALSE, sep = \t,    format = %d/%m/%Y %H:%M, tz = ) which yields a POSIXct time index. Alternatively, you can

[R] Gompertz-Makeham hazard models---test for significant difference

2012-04-15 Thread piltdownpunk
Hi, all. I'm working with published paleodemographic data (counts of skeletons that have been assigned into an age-range category, based upon observed morphological characteristics). For example, the following is the age distribution from a prehistoric cemetery in Egypt: naga -

[R] Compiling graphics into the same PDF file

2012-04-15 Thread damiloveu
I am new to R and RStudio. I am using a sweave template to compile a pdf file when i finish the R code. However, it generated a new pdf called Rplot.pdf to save all graphics separately from the original file? How could I combine the two pdf into one? Any helps will be appreciated. My work

[R] R: Help; error in optim

2012-04-15 Thread Christopher Kelvin
Hello, When i run the code below from Weibull distribution with 30% censoring by using optim i get an error form R, which states that Error in optim(start, fn = z, data = q, hessian = T) :    objective function in optim evaluates to length 25 not 1 can somebody help me remove this error. Is my

Re: [R] getting the value from previous row

2012-04-15 Thread arunkumar1111
Thanks it helped a lot - Thanks in Advance Arun -- View this message in context: http://r.789695.n4.nabble.com/getting-the-value-from-previous-row-tp4554761p4560577.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] R: Help; error in optim

2012-04-15 Thread Berend Hasselman
On 16-04-2012, at 07:04, Christopher Kelvin wrote: Hello, When i run the code below from Weibull distribution with 30% censoring by using optim i get an error form R, which states that Error in optim(start, fn = z, data = q, hessian = T) : objective function in optim evaluates to