[R] Matching multiple columns in a data frame

2009-05-07 Thread Raghavan, Nandini [PRDUS]
Hello, I am trying to extract a subset of a dataframe A (2 columns) by extracting all entries in A (several repeated entries) that match dataframe B in both columns. For example, part of A and B are shown below. The following does not seem to work correctly. This only seems to select on

Re: [R] Matching multiple columns in a data frame

2009-05-07 Thread Bill.Venables
A[with(A, paste(C1, C2, sep = \r)) %in% with(B, paste(C1, C2, sep=\r)), ] C1 C2 19 A 200 (Using sep = \r is perhaps a little too cautious.) Bill Venables http://www.cmis.csiro.au/bill.venables/ -Original Message- From: r-help-boun...@r-project.org

[R] RPgSQL package man pages

2009-05-07 Thread Tena Sakai
Hi, I installed the package RPgSQL and I am wanting to look at man pages. While the ones below do work: db.result.get.value db.write.table psql sql.insert sql.select sql.update the following man pages doesn't seem to work: rpgsql.connections rpgsql.execute.query rpgsql.input

Re: [R] Help with lme4 model specification

2009-05-07 Thread ONKELINX, Thierry
Please note that the case of characters is important in R. Hence True differs from TRUE. You need to use REML = TRUE instead of REML = True! The only valid logical values are TRUE, FALSE, T and F. But I recommend to use only TRUE and FALSE. Because you can overwrite T and F. You could do

[R] data transformation using gamma

2009-05-07 Thread Roslina Zakaria
Hi R-users, I have this code to uniformise the data using gamma: length(dp1) [1] 696 dim(dp1) [1] 58 12 dim(ahall) [1]  1 12 dim(bhall) [1]  1 12 trans_dt - function(dt,a,b) + { n1 - ncol(dt) +   n2 - length(dt) +   trans  - vector(mode='numeric', length=n2) +   dim(trans) - dim(dt) +  

Re: [R] I updated/reinstalled ggplot2 and the trouble started...

2009-05-07 Thread ONKELINX, Thierry
What device are you using to plot the graph? According to the warning, the device is causing the problem. HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and

[R] Gaussian local detrending and smoothing within a moving time window

2009-05-07 Thread mauede
Is there an R function implementing a Gaussian local detrending and smoothing within a moving time window ? I used ksmooth over the entire time series. Plotting the data before and after this operation shows that the signal is actuslly smoother but the tend is still there. I wonder whether

Re: [R] PGF Device

2009-05-07 Thread Lasse Bombien
Am Mittwoch, den 06.05.2009, 16:08 +0200 schrieb baptiste auguie: I think the pgfSweave project on R-forge is working on this (as far as i know it currently relies on eps2pgf) Right, but eps2pgf fails me on more complex / stacked plots. Otherwise, I would be content using eps2pgf. Lasse

[R] I need your help about plsr

2009-05-07 Thread yongkook Kwon
Hi, I need your help, so I send letter to you. I have a problem about plsr in pls package. I want to show how classfied or related each ohter samples, so I tried to use plsr and biplot. But, I failed. Because, I had to change data type of my sample. Unfortunately, I didn't know how change data

Re: [R] I need your help about plsr

2009-05-07 Thread Andris Jankevics
Hi, plsr funtion in pls package are intented for calculation of regression models. You must define your Y matrix as bianary identification matrix or You can just use plsda function from R's caret package. http://caret.r-forge.r-project.org/Classification_and_Regression_Training.html Best

Re: [R] Bumps chart in R

2009-05-07 Thread Andreas Christoffersen
On Thu, May 7, 2009 at 2:15 AM, Mike Lawrence mike.lawre...@dal.ca wrote: (cross posting to the ggplot2 group for posterity) Here's how I'd approach it: library(ggplot2) text = letters[1:20] tal1 = rnorm (20,5,2) tal2 = rnorm (20,6,3) dif = tal2-tal1 df0 = data.frame(text,tal1,tal2) df

Re: [R] Create Pie chart from .csv file

2009-05-07 Thread Richard . Cotton
Ive found out a way around my problem. I was trying to plaot a histogram of strings, but I had to change it into integers. I ran an sql query on the original DB that I got the CSV file from and used COUNT to get the number of each unique item in a given column. I then used these numbers to

Re: [R] When was the package relaimpo first introduced in R?

2009-05-07 Thread Uwe Ligges
Dimitri Liakhovitski wrote: Hello! I am wondering when the package relaimpo was first introduced in R? Or maybe there is a way to look it up? I am not seeing it in the help file. The first archived version in your_CRAN_Mirror/src/contrib/Archive/relaimpo/ is dated 01-Dec-2005, obviously.

Re: [R] Bumps chart in R

2009-05-07 Thread ONKELINX, Thierry
Dear Andreas and Mike, You need to use scale_colour_manual() if you want to set the colours yourself. Ggplot2 interpretes the col variable in the dataset as an ordinairy factor. library(ggplot2) df0 - data.frame(text = letters[1:21], tal1 = c(rnorm (20,5,2), 5), tal2 = c(rnorm (20,6,3), 5))

Re: [R] Matching multiple columns in a data frame

2009-05-07 Thread jim holtman
?merge merge(A,B) C1 C2 1 A 200 On Thu, May 7, 2009 at 2:19 AM, Raghavan, Nandini [PRDUS] nragh...@its.jnj.com wrote: Hello, I am trying to extract a subset of a dataframe A (2 columns) by extracting all entries in A (several repeated entries) that match dataframe B in both

[R] error using lapply with oneway_test (coin package)

2009-05-07 Thread Matthieu Dubois
Dear expeRts, I would like to use a oneway_test (from package coin) to test whether two groups differ on various variables. The variables are encoded within a data frame. Unfortunately, I obtained an error, that I don't understand. Could you please help me ? Example: library(coin) y -

[R] Show name of dataset in graph

2009-05-07 Thread O. Günther
Hi, I’ve written a script to run several multivariate statistical analysis automatically. As one result a biplot and screeplot is produced. Now I’d like to display the name of the inputdatset as part of the title of these graphics and I do not want to enter it each time I run the script. How can

[R] Generating plots with two lines, each line plotted with a different color

2009-05-07 Thread John Sorkin
R 2.9.0 windows xp I would like to have the two lines generated by my plot have different colors, in addition to the two different line types specified by the plot command below. I would appreciate advice on how I can specify line colors. plot(survfit(Surv(Age,Died) ~ Rx, data =

Re: [R] Generating plots with two lines, each line plotted with a different color

2009-05-07 Thread Zeljko Vrba
On Thu, May 07, 2009 at 08:00:59AM -0400, John Sorkin wrote: I would like to have the two lines generated by my plot have different colors, in addition to the two different line types specified by the plot command below. I would appreciate advice on how I can specify line colors.

Re: [R] error using lapply with oneway_test (coin package)

2009-05-07 Thread Duncan Murdoch
On 07/05/2009 6:11 AM, Matthieu Dubois wrote: Dear expeRts, I would like to use a oneway_test (from package coin) to test whether two groups differ on various variables. The variables are encoded within a data frame. Unfortunately, I obtained an error, that I don't understand. Could you

Re: [R] convert large integers to hex

2009-05-07 Thread Gabor Grothendieck
There is an interface between R and bc -- not on CRAN but available from its home page here: http://r-bc.googlecode.com source(http://r-bc.googlecode.com/svn/trunk/R/bc.R;) bc(obase = 16; 123456789123456789, retclass = character) [1] 1B69B4BACD05F15 On Wed, May 6, 2009 at 9:59 PM, jim holtman

Re: [R] Show name of dataset in graph

2009-05-07 Thread Richard . Cotton
I?ve written a script to run several multivariate statistical analysis automatically. As one result a biplot and screeplot is produced. Now I?d like to display the name of the inputdatset as part of the title of these graphics and I do not want to enter it each time I run the script. How

Re: [R] PGF Device

2009-05-07 Thread Dieter Menne
Lasse Bombien lasse at phonetik.uni-muenchen.de writes: Am Mittwoch, den 06.05.2009, 16:08 +0200 schrieb baptiste auguie: I think the pgfSweave project on R-forge is working on this (as far as i know it currently relies on eps2pgf) Right, but eps2pgf fails me on more complex / stacked

Re: [R] When was the package relaimpo first introduced in R?

2009-05-07 Thread Dimitri Liakhovitski
Thanks a lot, Uwe. Do you think you could expain how one looks this type of information up? What's obvious to some of us might not be obvious to others. Dimitri, der, obviously, deutsch spricht. 2009/5/7 Uwe Ligges lig...@statistik.tu-dortmund.de: Dimitri Liakhovitski wrote: Hello! I am

Re: [R] convert large integers to hex

2009-05-07 Thread Sundar Dorai-Raj
Thanks for both answers. In the end I decided to use Gabor's bc package. Thanks, --sundar On Thu, May 7, 2009 at 5:10 AM, Gabor Grothendieck ggrothendi...@gmail.com wrote: There is an interface between R and bc -- not on CRAN but available from its home page here: http://r-bc.googlecode.com

Re: [R] When was the package relaimpo first introduced in R?

2009-05-07 Thread Uwe Ligges
Dimitri Liakhovitski wrote: Thanks a lot, Uwe. Do you think you could expain how one looks this type of information up? What's obvious to some of us might not be obvious to others. Dimitri, der, obviously, deutsch spricht. Dimitri, on CRAN there is a package page and the link to the

Re: [R] PGF Device

2009-05-07 Thread baptiste auguie
If one was to implement a Tikz output for R graphics, I'm not sure what route to take: 1) focus exclusively on Grid graphics and implement a conversion at the R level à la gridSVG (see Paul Murrell's webpage) 2) create a new device ( I have no idea where to find guidelines for this, and

[R] Bubble Plot Over a Map

2009-05-07 Thread Rodrigo Aluizio
Hi everybody, Well here is another doubt! I’m elaborating some maps, and I pretend to plot over it the abundance of species. I could do that using points(), but I’d like to use bubble() from sp package. When trying to use bubble() I face the fallowing issue: When I call the bubble function it

Re: [R] When was the package relaimpo first introduced in R?

2009-05-07 Thread Dimitri Liakhovitski
Vielen Dank, Uwe! Dimitri 2009/5/7 Uwe Ligges lig...@statistik.tu-dortmund.de: Dimitri Liakhovitski wrote: Thanks a lot, Uwe. Do you think you could expain how one looks this type of information up? What's obvious to some of us might not be obvious to others. Dimitri, der, obviously,

[R] RSPerl and Statistics::R

2009-05-07 Thread Daniel Klein
Greetings! Being a Perl hacker for some time, and wanting to leverage what R provides, I've been trying to work with Statistics::R and RSPerl. The former has a race condition that breeds some unreliability and the latter seems to have issues all around, and neither has been updated in some

[R] extending strsplit to handle missing text that doesn't have the target on which to split

2009-05-07 Thread Chris Evans
I am sure there is an obvious answer to this that I'm missing but I can't find it. I'm parsing headers of Emails and most have a date like this: Wed, 16 Nov 2005 05:28:00 -0800 and I can parse that using: tmp.dat.data - matrix(unlist(strsplit(headers$Date.line,,)), ncol = 2, byrow = TRUE)

[R] How to call time series functions from C ?

2009-05-07 Thread goon83
Hi everyone, I meet the problem to call R from C. Can someone tell me is it possible to call time series functions(such as ar and arima)from C program on linux platform, and then compile the C program to a standalone executable file? I know we can call some function defined in Rmath.h

Re: [R] Show name of dataset in graph

2009-05-07 Thread S Ellison
The usual way of doing this in R functions is via deparse, as in the examples in ?deparse: fd-function(x) plot(x, main=deparse(substitute(x))) q-1:10 fd(q) as.character works for simple cases but is probably not the best option. Compare fd(log(q)) with fc-function(x) plot(x,

[R] Step and stepAIC

2009-05-07 Thread Peter-Heinz Fox
Hi all,   I’m using step and stepAIC for stepwise regression. After each step, I would like to make an additional calculation based on the independent variables that have been selected until this step and their corresponding weights. Where do I have to add this calculation?   And a second

Re: [R] Print to File Formatting

2009-05-07 Thread Luc Villandre
Brigid Mooney wrote: Hello, I am writing out to a file and have two quick questions that I can't seem to track down the correct answers for. Luckily, I *think* they are both simple enough that someone might be able to point me in the right direction on them without too much trouble. Both

Re: [R] How to call time series functions from C ?

2009-05-07 Thread Duncan Murdoch
On 5/7/2009 9:24 AM, goon83 wrote: Hi everyone, I meet the problem to call R from C. Can someone tell me is it possible to call time series functions(such as ar and arima)from C program on linux platform, and then compile the C program to a standalone executable file? I know we can

[R] Plotting counts vs. intervals for a shingle

2009-05-07 Thread Walcerz, Douglas (APG)
Hello! Suppose I have a set of values: a - c(1:10, 5:10) Suppose I also have a set of intervals: b - cbind(c(0,2.5,4.5,6.5), c(5.5,7.5,9.5,11)) I can create a shingle that counts how many values are in each interval: c - shingle(a, b) I can display the shingle to see the counts: summary(c,

Re: [R] data transformation using gamma

2009-05-07 Thread Patrizio Frederic
Roslina, this code performs what you need: dt = matrix((1:(58*12))/58/12,58) # some numbers # if dt is a data.frame use dt = as.matrix(dt) a = (1:12)/12 # some a coef b = (12:1)/12 # some b coef dtgam = matrix(pgamma(dt,a,b),58) # dtgam is the transformation you're looking for

Re: [R] Generating plots with two lines, each line plotted with a different color

2009-05-07 Thread Thomas Lumley
On Thu, 7 May 2009, John Sorkin wrote: R 2.9.0 windows xp I would like to have the two lines generated by my plot have different colors, in addition to the two different line types specified by the plot command below. I would appreciate advice on how I can specify line colors.

Re: [R] Step and stepAIC

2009-05-07 Thread Dieter Menne
Peter-Heinz Fox peterheinzfox at yahoo.de writes: I’m using step and stepAIC for stepwise regression. After each step, I would like to make an additional calculation based on the independent variables that have been selected until this step and their corresponding weights. Where do I have

Re: [R] error using lapply with oneway_test (coin package)

2009-05-07 Thread Torsten Hothorn
That's a scoping problem, I think a bug in oneway_test. Because the formula var ~ group is created with the anonymous function within lapply, its environment should be the evaluation frame of that function call and var should be visible. If I replace oneway_test() with lm() it works. I

Re: [R] Bubble Plot Over a Map

2009-05-07 Thread Olivier ETERRADOSSI
Hi Rodrigo, did you consider having a look at package ggplot2 (thanks to Hadley Wickham). I guess you'll find something very close to your need (functions ggplot, geom_point,...) Hope this helps. regards. Olivier Rodrigo Aluizio wrote: Hi everybody, Well here is another doubt! I’m

[R] A potential bug for paste() ?

2009-05-07 Thread Jun Shen
Hi, everyone, Try the following command to see if you get TRUE or FALSE. I get FALSE on a unix platform but TRUE on Windows. Any comment? all(paste(Theoph[1],Theoph[2])==paste(Theoph[[1]],Theoph[[2]])) -- Jun Shen PhD PK/PD Scientist BioPharma Services Millipore Corporation 15 Research Park

Re: [R] How to call time series functions from C ?

2009-05-07 Thread goon83
hi Duncan, tks for you response, it's depressed to know that i can not use time series of R to finish my study. I really think R is powerfull, i used it to finish all my statistic homework last year^_^. but i still wonder can i use the function of time series in the embedded way of C

Re: [R] A potential bug for paste() ?

2009-05-07 Thread Sarah Goslee
It probably has less to do with paste() than with Theoph, but since we have no idea what that might be, it's hard to tell. See the bit about reproducible example, please. Sarah On Thu, May 7, 2009 at 10:38 AM, Jun Shen jun.shen...@gmail.com wrote: Hi, everyone, Try the following command to

Re: [R] PGF Device

2009-05-07 Thread Lasse Bombien
I can only second Dieter and Baptiste. Am Donnerstag, den 07.05.2009, 14:57 +0200 schrieb baptiste auguie: If one was to implement a Tikz output for R graphics, I'm not sure what route to take: 1) focus exclusively on Grid graphics and implement a conversion at the R level à la gridSVG

Re: [R] How to call time series functions from C ?

2009-05-07 Thread Duncan Murdoch
On 5/7/2009 10:55 AM, goon83 wrote: hi Duncan, tks for you response, it's depressed to know that i can not use time series of R to finish my study. I really think R is powerfull, i used it to finish all my statistic homework last year^_^. but i still wonder can i use the function of time

[R] Linear least squares fit with errors in both x and y values.

2009-05-07 Thread James Allsopp
Hi, I'd like to perform a weighted linear least squares fit with R on data with varying errors on both vectors. I can do this with one axis using lm, but have no idea where to go from here. I've tried googling, but no idea. Any suggestions? I'm also trying to plot these errors on a graph. Again I

Re: [R] Step and stepAIC

2009-05-07 Thread Jun Shen
I also wonder if stepAIC can work with an lme model. I tried. it doesn't for now. Appreciate any comment. Jun On Thu, May 7, 2009 at 9:15 AM, Dieter Menne dieter.me...@menne-biomed.dewrote: Peter-Heinz Fox peterheinzfox at yahoo.de writes: I’m using step and stepAIC for stepwise

Re: [R] How to call time series functions from C ?

2009-05-07 Thread goon83
Hi Duncan, Sorry, i miss the informatin in the previous message, you said that i can write a front end to call , does the front end can be implemented by c, and i can compile the c code to a standalone program. i will appreiciate for more detail information tks? ?

Re: [R] Bumps chart in R

2009-05-07 Thread Andreas Christoffersen
Thank you Thierry! That was very helpfull I have added geom_point which makes the lineending look more round. Also - since the chart becomes verye clustered I also added text to the right. like so: ggplot(df, aes(x = tal, y = value, label = text, group = text, size = size, col = Change))+

Re: [R] How to call time series functions from C ?

2009-05-07 Thread Whit Armstrong
you have a couple of options. If you require specific R functions to do what you want, then you will need to call R from C. I believe that Dirk has been working on an RInside package that does this. Alternatively, you can use my tslib package, which is a general time series library written in

[R] Draw a random number about the fitting of a glm model using family=quasi

2009-05-07 Thread jpl
Hi, I desire to draw a random number about the fitting of a glm model using a quasi linear error distribution. For example, if my family is poisson, then this is what I want: model1 = glm(amount~days,family=poisson(link=log),data=dataset1) mean1 = predict(model1,newdata

[R] Linear least squares fit with errors in both x and y values.

2009-05-07 Thread James Allsopp
HI, I'd like to perform a weighted linear least squares fit with R on data with varying errors on both vectors. I can do this with one axis using lm, but have no idea where to go from here. I've tried googling, but no idea. Any suggestions? Thanks, James

[R] How to save independent R sessions in BATCH mode???

2009-05-07 Thread mcnda839
Hi guys, I already have put this question some time ago however replies were not straight to the problem. Even so thanks a lot for the answers! I reformulate the problem. I have a script file with the following commands: for (i in 1:300) - open session -- load(“X_i.rdata”) - perform some

Re: [R] Help with lme4 model specification

2009-05-07 Thread boeinguy2
Thanks! I made this correction ONKELINX, Thierry wrote: Please note that the case of characters is important in R. Hence True differs from TRUE. You need to use REML = TRUE instead of REML = True! The only valid logical values are TRUE, FALSE, T and F. But I recommend to use only TRUE

[R] compiling 64 bit JRI.dll with 64bit XP

2009-05-07 Thread gatechatl
Hi all, I was able to run my Java-R program using a 32-bit jdk on my 64-bit machine; however I wish to use the 64-bit jdk so my Java program can take advantage of the larger memory capabilities etc. I'm currently trying to compile JRI_0.4-1 on a 64-bit XP I got to a point that I was able to

Re: [R] How to call time series functions from C ?

2009-05-07 Thread Gabor Grothendieck
Do you have to use the entire xxxGB at once? If not store it in a database and fetch the portions for the current analysis as you need them. On Thu, May 7, 2009 at 10:55 AM, goon83 goo...@126.com wrote: hi Duncan, tks for you response, it's depressed to know that i can not use time series

Re: [R] Step and stepAIC

2009-05-07 Thread Dieter Menne
Jun Shen jun.shen.ut at gmail.com writes: I also wonder if stepAIC can work with an lme model. I tried. it doesn't for now. Appreciate any comment. It can, and it displays a nice error message telling you exactly why it did not work if you try out of the box. Check parameter method in your

[R] visualization of sub-parts in 3D arrays

2009-05-07 Thread jgarcia
Hello all; Let's say we have a block of 3D data belonging to cubic cells, and increasing indexes are ordered x: from west to east y: from north to south z: from top to bottom --- nx - 25 ny - 12 nz - 4 my.array - array(NA,dim=c(nx,ny,nz)) for(z in 1:nz){ my.array[,,z] - runif(nx*ny,z-1,z)

Re: [R] Step and stepAIC

2009-05-07 Thread Dieter Menne
Jun Shen jun.shen.ut at gmail.com writes: I also wonder if stepAIC can work with an lme model. I tried. it doesn't for now. Appreciate any comment. It can do it, and it displays a nice error message, as I remember, why it won't do it in the default setting. Check parameter method of your

[R] lasso based selection for mixed model

2009-05-07 Thread Dieter Menne
Dear useRs (called Frank Harrell, most likely), after having preached for years to my medical colleagues to be cautious with stepwise selection procedures, they chanted back asking for an alternative when using mixed models. There is a half dozen laXXX packages around for all types of linear

Re: [R] A potential bug for paste() ?

2009-05-07 Thread Gavin Simpson
On Thu, 2009-05-07 at 09:38 -0500, Jun Shen wrote: Hi, everyone, Try the following command to see if you get TRUE or FALSE. I get FALSE on a unix platform but TRUE on Windows. Any comment? all(paste(Theoph[1],Theoph[2])==paste(Theoph[[1]],Theoph[[2]])) And what is Theoph? Please do read

Re: [R] I updated/reinstalled ggplot2 and the trouble started...

2009-05-07 Thread Tena Sakai
Hi, What device are you using to plot the graph? I am not explicitly specifying any. I am on redhat linux and as I understand it R uses DISPLAY environment variable, which is set for an X11 server (X Darwin, v1.4.0, X11 6.8.2). Other qplot()'s I have used (straight out of the book) work fine.

Re: [R] Step and stepAIC

2009-05-07 Thread Jun Shen
Thanks a lot, Dieter, I changed the method to ML for my lme call. Now I get a different error when running the stepAIC Error in terms.formula(formula, data = data) : 'data' argument is of the wrong type What does that mean? The same dataset was used for an lm call and everything is fine to

Re: [R] Linear least squares fit with errors in both x and y values.

2009-05-07 Thread Gerard M. Keogh
James, look up errors in variables models or instrumental variable models in econometrics. The statistics alternative is a random effects or mixed effects model which plugs the variation in the x's into a randomly varying parameter - these are available in R (?lmer or glmm - I think). Someone on

Re: [R] How to call time series functions from C ?

2009-05-07 Thread Duncan Murdoch
On 5/7/2009 11:17 AM, goon83 wrote: Hi Duncan, Sorry, i miss the informatin in the previous message, you said that i can write a front end to call , does the front end can be implemented by c, and i can compile the c code to a standalone program. i will appreiciate for more detail

Re: [R] A potential bug for paste() ?

2009-05-07 Thread Douglas Bates
On Thu, May 7, 2009 at 9:56 AM, Sarah Goslee sarah.gos...@gmail.com wrote: It probably has less to do with paste() than with Theoph, but since we have no idea what that might be, it's hard to tell. See the bit about reproducible example, please. Well, actually Theoph is one of the datasets in

Re: [R] dotplot: labeling coordinates for each point

2009-05-07 Thread Deepayan Sarkar
On Thu, May 7, 2009 at 7:42 AM, Qifei Zhu zhu_qi...@yahoo.com.sg wrote: Hi Deepayan, I guess I’m quite confusing when asking the question. I was actually looking for labels beside the dot in the graph (shown below), rather than the labels on the x-axis. Is that possible? Thanks a lot! In

Re: [R] A potential bug for paste() ?

2009-05-07 Thread Phil Spector
Theoph is in the datasets package, so it should be available in all versions of R: class(Theoph) [1] nfnGroupedData nfGroupedData groupedDatadata.frame The key to what's happening is that there are some methods for groupedData objects in the nlme library, which I suspect the original

Re: [R] A potential bug for paste() ?

2009-05-07 Thread Jun Shen
Thanks for everyone's attention on this issue! On Thu, May 7, 2009 at 11:20 AM, Phil Spector spec...@stat.berkeley.eduwrote: Theoph is in the datasets package, so it should be available in all versions of R: class(Theoph) [1] nfnGroupedData nfGroupedData groupedDatadata.frame The

Re: [R] Step and stepAIC

2009-05-07 Thread Dieter Menne
Jun Shen jun.shen.ut at gmail.com writes: I changed the method to ML for my lme call. Now I get a different error when running the stepAIC Error in terms.formula(formula, data = data) : 'data' argument is of the wrong type What does that mean? The same dataset was used for an lm call

[R] 64 bit R double precision

2009-05-07 Thread Paul Emberson
Hi, If R is compiled for a 64 bit platform, does the double data type make use of the additional precision or is it set at a fixed length? Thanks, Paul __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] Step and stepAIC

2009-05-07 Thread Jun Shen
Hi, Dieter, sessionInfo() R version 2.9.0 (2009-04-17) i386-pc-mingw32 str(cov) 'data.frame': 40 obs. of 13 variables: $ ID : int 2 3 4 5 6 7 8 9 10 11 ... $ AMT : num 50 50 50 50 50 50 50 50 25 25 ... $ Cmax : num [1:40(1d)] 8901 5574 10496 10882 8130 ... ..- attr(*,

Re: [R] RSPerl and Statistics::R

2009-05-07 Thread Duncan Temple Lang
RSPerl is not abandonded, but I haven't had much time to work on it. If you can send me an example to reproduce the race condition, we can probably think about a solution. D. Daniel Klein wrote: Greetings! Being a Perl hacker for some time, and wanting to leverage what R provides, I've

[R] .First and loading a package in a workspace

2009-05-07 Thread Seth Schommer
Hi, I'm writing a package called rNMR and I'd like to be able to save a workspace with rNMR loaded, exit R, and then load the workspace, loading rNMR at the same time. This is no problem on Windows but on Linux and Macs I can't get it to work. Here's the deal. rNMR has includes a .onLoad

Re: [R] 64 bit R double precision

2009-05-07 Thread Duncan Murdoch
On 5/7/2009 12:56 PM, Paul Emberson wrote: Hi, If R is compiled for a 64 bit platform, does the double data type make use of the additional precision or is it set at a fixed length? It is still a 64 bit floating point value. R may use long double internally for some calculations, but the

Re: [R] Step and stepAIC

2009-05-07 Thread Dieter Menne
Jun Shen jun.shen.ut at gmail.com writes: lme(biomarker~Cmax+AGE,data=cov,method='ML',random=~1+AGE|ID,keep.data=T) Warning message: In lme.formula(biomarker ~ Cmax + AGE, data = cov, method = ML, : Fewer observations than random effects in all level 1 groups That's why the posting guide

Re: [R] 64 bit R double precision

2009-05-07 Thread Peter Dalgaard
Paul Emberson wrote: Hi, If R is compiled for a 64 bit platform, does the double data type make use of the additional precision or is it set at a fixed length? No. Double is double, 64 bits, although sometimes 80 bits when things are kept in registers. However, even though the FPU is

Re: [R] How to do Naive Bayes in R?

2009-05-07 Thread Dylan Beaudette
On Wednesday 06 May 2009, spencerg wrote: help.search('bayes') only searches installed packages. To go beyond that, you might try the following: Thanks for the clarification. Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of

[R] help~ how can I drow colorful text in biplot.

2009-05-07 Thread yongkook Kwon
Hi. I want to show easily classified samples in the one biplot. My samples have 14 types and each type have 21 samples So, I cannot understand distribution of samples after plsda. I want to give a color each types text in graph. How can I do that? [[alternative HTML version deleted]]

Re: [R] Help with lme4 model specification

2009-05-07 Thread boeinguy2
Thanks for your response. This is suspicious : Spar_loc doesn't appear in your statement... Yes Spar_loc should look suspicious. I posted the real error messages but hid the variable names in the model. Spar_loc is the original form of S. The precedence of modelling operators is not very

[R] Weighted multinomial logistic regression using the mlogit package

2009-05-07 Thread Freiman, Michael
I have been trying to use the mlogit package to do a multinomial logistic regression, including both alternative-specific and individual-specific variables. I used the mlogit.data function to turn my dataframe into the correct format for the mlogit function, and have been able to run the

[R] increasing memory for R bg job

2009-05-07 Thread carol white
Hi, Is the following command used to increase the memory or any other command when a background R job is run? R --min-vsize=vl --max-vsize=vu --min-nsize=nl --max-nsize=nu --max-ppsize=N source: http://stat.ethz.ch/R-manual/R-patched/library/base/html/Memory.html Thx Carol

[R] CHM error

2009-05-07 Thread tognox
Hi, I would need some help in solving a problem with my R. Whenever I try to type ?paste or in general any command for the html help in R, I receive this error message. The strange thing is that I have never had this kind of problem in the past with R, and now I really don't understand why it

[R] for loop vectorization

2009-05-07 Thread miraceti
Hi, I am still not familiar with vectorization. Could you help with making this for loop more efficient? The code is trying to make a Q matrix for a multidimensional state space with specific conditions. thanks Mira tmp = 0:(maxvals[1]) for(i in 2:nchars) { tmp - outer(tmp, 0:(maxvals[i]),

[R] GAM ordered probit

2009-05-07 Thread Mehdi Shadmehr
Dear All, Anyone know if there is a package that fits Generalized Linear Models(GAM) to data with ordered dependent variable(response) ? Simon Wood's mgcv has probit, logit,... other links, however, I could not find a way to do GAM *ordered *probit. Yee's VGAM claims to fit ordinal proportional

Re: [R] for loop vectorization

2009-05-07 Thread miraceti
uhoh, missed two lines on the top.Sorry about that. the whole code looks like this. nchars = 4 maxvals = c(2,2,2,2) tmp = 0:(maxvals[1]) for(i in 2:nchars) { tmp - outer(tmp, 0:(maxvals[i]), FUN=paste, sep=.) } states = tmp stateidx = array(1:length(states), dim=dim(states)) transition -

Re: [R] dependency ‘Matrix’ is not availabl e when installing Rcmdr

2009-05-07 Thread Uwe Ligges
Uwe Ligges wrote: Argh, it disappeared. Probably a bug in my scripts that removed the old version of Matrix from the Windows binary repository for R-2.8.x (new versions of Matrix won't pass checks under the outdated version of R). I will compile an old version tomorrow and make it available

Re: [R] levelplot question

2009-05-07 Thread Greg Snow
From the help for panel.levelplot in the section on 'col.regions': the exact number being one more than the length of 'at' was what I based my assumption on (also the not longer than at phrase in the last sentence on recycling). The second part was somewhat speculation on my part,

Re: [R] levelplot question

2009-05-07 Thread Deepayan Sarkar
On Thu, May 7, 2009 at 12:02 PM, Greg Snow greg.s...@imail.org wrote: From the help for panel.levelplot in the section on 'col.regions': the exact number being one          more than the length of 'at' was what I based my assumption on (also the not longer than at phrase in the last

Re: [R] PGF Device

2009-05-07 Thread Greg Snow
Have you contacted the author of eps2pgf? A while back I had a plot generated by R that produced an error in eps2pgf, I sent a copy of it to the author of eps2pgf and within a couple of days he sent me a new version that worked with my plot. But he cannot fix problems that he does not know

Re: [R] by-group processing

2009-05-07 Thread William Dunlap
Max, Since the dataset is sorted by ID, with ties broken by N, the following should do it and do it quickly. It grabs the rows just before ID changes. with(data, data[ c(ID[-1] != ID[-length(ID)], TRUE),, drop=FALSE]) ID Type N 7 45900I 7 10 49270E 3 24 46550I 7 Bill Dunlap

Re: [R] for loop vectorization

2009-05-07 Thread miraceti
this 'ifelse' usage looks promising. thank you very much. On Thu, May 7, 2009 at 3:12 PM, Patrick Burns pbu...@pburns.seanet.comwrote: If you haven't seen it yet, 'The R Inferno' may be of use to you. Patrick Burns patr...@burns-stat.com +44 (0)20 8525 0696 http://www.burns-stat.com

Re: [R] Do you use R for data manipulation?

2009-05-07 Thread Martin Waller
+1. I worked with Matthew for a while and saw in practice just how powerful that package is. I'm surprised it isn't more widely used. Martin Tom Short wrote: Another tool I find useful is Matthew Dowle's data.table package. It has very fast indexing, can have much lower memory requirements

[R] Using lme() for split plot

2009-05-07 Thread Joshua Stults
Hi, I'm trying to figure out how to use lme() for analyzing a split-plot experiment. I've been looking at the examples from the 'R Book', those are nested but with only one factor at the whole-plot level, my test is 2^2 at the whole-plot level, with a single many level factor at the sub-plot

[R] making an Affybatch object for expresso

2009-05-07 Thread George Chen
Hi All, I have microarray data that does not come in a CEL file. Currently it is in the form of columns = individual samples and rows = individual probes. There are about 79 columns and it is in a tab delimited text file. Is there a way to convert this file into an AffyBatch so that I can

Re: [R] PGF Device

2009-05-07 Thread Lasse Bombien
No I haven't done that, and of course, you're right. I'll do that. But I still wish there was a way to generate PGF code directly. Lasse Am Donnerstag, den 07.05.2009, 13:28 -0600 schrieb Greg Snow: Have you contacted the author of eps2pgf? A while back I had a plot generated by R that

Re: [R] PGF Device

2009-05-07 Thread Lasse Bombien
In fact, eps2pgf worked fine in my example after building it from svn. Am Donnerstag, den 07.05.2009, 13:28 -0600 schrieb Greg Snow: Have you contacted the author of eps2pgf? A while back I had a plot generated by R that produced an error in eps2pgf, I sent a copy of it to the author of

[R] How to properly shade the background panels of an xyplot?

2009-05-07 Thread Daniel Kornhauser
Hi: Here is simplified example of what I am having trouble with: I want to set the gray shade of the background of each panel of a xyplot with its mean. My aim is to be able to compare at a glance which panel has the highest mean. But, in order to achieve this I have to normalize the means

  1   2   >