[R] Displaying str(zoo) in Sweave

2011-09-20 Thread Ashim Kapoor
Dear R-helpers, Please look at the following minimal code. \documentclass[a4paper]{article} \begin{document} == library(zoo) a-zoo(1:4,order.by=Sys.time()+1:4) str(a) @ \end{document} When I do R CMD Sweave,followed by pdflatex ,and view the final pdf, the letter surrounding the phrase zoo, a

Re: [R] Selecting from matrix and then stacking in array.

2011-09-20 Thread Kristian Lind
Thank you. It works great. Kristian 2011/9/16 R. Michael Weylandt michael.weyla...@gmail.com I think changing nrow() to NROW() will get around that error. However, this, as you can see, this goes a little astray at the end. Perhaps something like this will work for you: z.ext -

Re: [R] joint histogram for image comparison

2011-09-20 Thread Paul Hiemstra
On 09/19/2011 12:49 PM, aurelien wrote: Dear all, I need to compute a joint histogram to compare 2 images (with image() function). I wonder if there is any function available in R to do this properly? Thanks for your help, Aurrélien -- View this message in context:

[R] Problem with converting factors to numbers

2011-09-20 Thread _Luc_
Hi all, I have a very simple problem, but i cant find a solution probably because i search for the wrong keywords. I have coordinates x and y. They look like this: str(data) 'data.frame': 13979 obs. of 2 variables: $ x : Factor w/ 3815 levels ,186011.4971280,..: 1528 1524 1524

Re: [R] Problem with converting factors to numbers

2011-09-20 Thread Jim Holtman
this is an FAQ (forget which one), but the solution is: as.numeric(as.character(data$x)) Sent from my iPad On Sep 20, 2011, at 3:40, _Luc_ l.temarve...@nioo.knaw.nl wrote: Hi all, I have a very simple problem, but i cant find a solution probably because i search for the wrong keywords. I

[R] Tabulating Baseline Characteristics on specific observations

2011-09-20 Thread justin jarvis
I have a data set with many missing observations. When I run a regression, R of course discards the observations (the whole row) that have NA. I want to tabulate some baseline characteristics (column means) but only for the observations that R used for the regression. I tried to recreate this

Re: [R] text matching

2011-09-20 Thread Takatsugu Kobayashi
Hi, The str_locate function instringr package may do what you are looking for. Hope this link will help... http://en.wikibooks.org/wiki/R_Programming/Text_Processing Taka On Mon, Sep 19, 2011 at 7:15 PM, SNV Krishna kris...@primps.com.sg wrote: Hi All, I have a character vector by name

Re: [R] Problem with converting factors to numbers

2011-09-20 Thread Petr PIKAL
Hi [R] Problem with converting factors to numbers Hi all, I have a very simple problem, but i cant find a solution probably because i search for the wrong keywords. I have coordinates x and y. They look like this: str(data) 'data.frame': 13979 obs. of 2 variables: $ x

[R] The CRAN packages webpages are not found

2011-09-20 Thread Tal Galili
I am not sure who to send this to - so I am writing this here. It seems that the index.html pages on CRAN are gone. For example: http://cran.r-project.org/web/packages/ggplot2/index.html Is gone. But the directory is accessible: http://cran.r-project.org/web/packages/ggplot2/ Who should this be

Re: [R] The CRAN packages webpages are not found

2011-09-20 Thread Achim Zeileis
On Tue, 20 Sep 2011, Tal Galili wrote: I am not sure who to send this to - so I am writing this here. It seems that the index.html pages on CRAN are gone. For example: http://cran.r-project.org/web/packages/ggplot2/index.html Is gone. But the directory is accessible:

Re: [R] closeness of codes

2011-09-20 Thread Jim Lemon
On 09/19/2011 04:46 PM, Henri-Paul Indiogine wrote: Greetings! I am using the R library RQDA to assign certain codes to paragraphs of documents in a collection. Several paragraphs are assigned more than 1 code. E.g. often the codes poverty and education will be assigned to the same

Re: [R] switching off commands within character vector

2011-09-20 Thread Marion Wenty
hello, thank you for your answer! yes, now it is working! marion 2011/9/19 Duncan Murdoch murdoch.dun...@gmail.com On 11-09-19 7:30 AM, Marion Wenty wrote: Hello, could someone help me with this problem?: I would like to create a latex-script inside of a character vector in order to

Re: [R] pasting elements of one character vector together

2011-09-20 Thread Marion Wenty
I have another question concerning the paste command: now instead of a vector I would like to paste the elements of a matrix together, which works in the same: Mypastedmatrix - paste(Mymatrix,collapse=) My problem now is that the program does this BY COLUMN, but I would like to have the

Re: [R] Strplit code

2011-09-20 Thread Santosh
Dear R- Splus experts, In R, I have frequently used do.call with strsplit. and I have a hard time with Splus.. any suggestions? for example, the R code below: do.call(rbind,strsplit(paste(letters[1:10],c(1:10)), )) Thanks so much, Santosh On Fri, Dec 5, 2008 at 8:51 AM, William Dunlap

Re: [R] pasting elements of one character vector together

2011-09-20 Thread Eik Vettorazzi
Hi marion, just transpose the matrix: mm-matrix(LETTERS[1:20],nrow=5) paste(t(mm),collapse=) or - if you want the result seperated by rows apply(mm,1,paste,collapse=) cheers Am 20.09.2011 11:55, schrieb Marion Wenty: I have another question concerning the paste command: now instead of a

[R] Add a function in rq

2011-09-20 Thread mael
Hi, I am trying to add a function in a linear quantile regresion to find a breakpoint. The function I want to add is: y=(k+ax)(xlt;B)+(k+(a-d)B+dx)(xgt;B) How do I write it in the rq() function? Do I need to define the parameters in any way and how do I do that? I'm a biologist new to R.

Re: [R] pasting elements of one character vector together

2011-09-20 Thread Sarah Goslee
It isn't entirely clear to me what you want, but here are all the possibilities I could think of. I hope one of them does what you want. testmat - matrix(1:8, ncol=2) testmat [,1] [,2] [1,]15 [2,]26 [3,]37 [4,]48 paste(testmat, collapse= ) [1] 1 2 3 4 5 6 7

Re: [R] The CRAN packages webpages are not found

2011-09-20 Thread Stefan Theussl
On 09/20/2011 10:57 AM, Achim Zeileis wrote: On Tue, 20 Sep 2011, Tal Galili wrote: I am not sure who to send this to - so I am writing this here. It seems that the index.html pages on CRAN are gone. For example: http://cran.r-project.org/web/packages/ggplot2/index.html Is gone. But the

Re: [R] R-help Digest, Vol 103, Issue 19

2011-09-20 Thread mihalicza . peter
Szeptember 12-től 26-ig irodán kívül vagyok, és az emailjeimet nem érem el. Sürgős esetben kérem forduljon Kárpáti Edithez (karpati.e...@gyemszi.hu). Üdvözlettel, Mihalicza Péter I will be out of the office from 12 till 26 September with no access to my emails. In urgent cases please contact

Re: [R] Displaying str(zoo) in Sweave

2011-09-20 Thread Duncan Murdoch
On 11-09-20 3:08 AM, Ashim Kapoor wrote: Dear R-helpers, Please look at the following minimal code. \documentclass[a4paper]{article} \begin{document} == library(zoo) a-zoo(1:4,order.by=Sys.time()+1:4) str(a) @ \end{document} When I do R CMD Sweave,followed by pdflatex ,and view the final pdf,

Re: [R] Problem with converting factors to numbers

2011-09-20 Thread _Luc_
ok great, as.numeric(as.character(data$x)) works perfectly. I am sorry that i did not find this before making this post. @ peter what did not work was: data$x2 - as.character(data$x) data$x3 - as.numeric(data$x2) -- View this message in context:

Re: [R] Problem with converting factors to numbers

2011-09-20 Thread Duncan Murdoch
On 11-09-20 7:25 AM, _Luc_ wrote: ok great, as.numeric(as.character(data$x)) works perfectly. I am sorry that i did not find this before making this post. @ peter what did not work was: data$x2- as.character(data$x) data$x3- as.numeric(data$x2) That should have worked. Can you put together

Re: [R] Displaying str(zoo) in Sweave

2011-09-20 Thread Ashim Kapoor
On Tue, Sep 20, 2011 at 4:31 PM, Duncan Murdoch murdoch.dun...@gmail.comwrote: On 11-09-20 3:08 AM, Ashim Kapoor wrote: Dear R-helpers, Please look at the following minimal code. \documentclass[a4paper]{**article} \begin{document} == library(zoo) a-zoo(1:4,order.by=Sys.time()**+1:4)

[R] predict() of garchFit

2011-09-20 Thread user84
Hi, could anyone tell me how predict() predicts the meanError or standardDerivation of a garchFit(1,1)-model, knowing the coefficients mu, omega, alpha1, beta1 and of course all datapoints? Thanks and sorry for my poor english. -- View this message in context:

Re: [R] Tabulating Baseline Characteristics on specific observations

2011-09-20 Thread David Winsemius
On Sep 19, 2011, at 8:49 PM, justin jarvis wrote: I have a data set with many missing observations. When I run a regression, R of course discards the observations (the whole row) that have NA. I want to tabulate some baseline characteristics (column means) but only for the observations that

Re: [R] closeness of codes

2011-09-20 Thread Jean V Adams
Jim Lemon wrote on 09/20/2011 04:15:46 AM: On 09/19/2011 04:46 PM, Henri-Paul Indiogine wrote: Greetings! I am using the R library RQDA to assign certain codes to paragraphs of documents in a collection. Several paragraphs are assigned more than 1 code. E.g. often the codes poverty

Re: [R] pasting elements of one character vector together

2011-09-20 Thread Marion Wenty
hi eik, mark and sarah, thank you for your help! i was looking for the t-command but in the end the apply-command did the trick. marion 2011/9/20 Sarah Goslee sarah.gos...@gmail.com It isn't entirely clear to me what you want, but here are all the possibilities I could think of. I hope one

[R] Poisson-Gamma computation (parameters and likelihood)

2011-09-20 Thread Sebastiano Putoto
Good afternoon/morning readers. This is the first time I am trying to run some Bayesian computation in R, and am experiencing a few problems. I am working on a Poisson model for cancer rates which has a conjugate Gamma prior. 1) The first question is precisely how I work out the parameters.

[R] open source editor for r for beginners

2011-09-20 Thread Marion Wenty
Hello all, I am looking for an editor for R which has got functions beyond the normal R editor that is included in the program. I had a look at VIM but I think it's difficult if you are just starting programming. Could anyone recommend an editor that is suitable for beginners? Thanks for your

Re: [R] open source editor for r for beginners

2011-09-20 Thread R. Michael Weylandt
RStudio Hope this helps, Michael Weylandt On Tue, Sep 20, 2011 at 9:26 AM, Marion Wenty marion.we...@gmail.comwrote: Hello all, I am looking for an editor for R which has got functions beyond the normal R editor that is included in the program. I had a look at VIM but I think it's

[R] seqinr-dist.alignment?

2011-09-20 Thread Betty Schirrmeister
Hi everyone I have got a quick question: I the seqinr package: *dist.alignment(x,identity)* This is calculating the square root of pairwise distances. Does anyone know whether/how gaps are counted in this function? Thank you. Best wishes, Bettina [[alternative HTML version

Re: [R] Add a function in rq

2011-09-20 Thread David Winsemius
On Sep 20, 2011, at 4:50 AM, mael wrote: Hi, I am trying to add a function in a linear quantile regresion to find a breakpoint. The function I want to add is: y=(k+ax)(xlt;B)+(k+(a-d)B+dx)(xgt;B) How do I write it in the rq() function? Do I need to define the parameters in any way and

Re: [R] open source editor for r for beginners

2011-09-20 Thread Rich Shepard
On Tue, 20 Sep 2011, Marion Wenty wrote: I am looking for an editor for R which has got functions beyond the normal R editor that is included in the program. I had a look at VIM but I think it's difficult if you are just starting programming. Marion, VIM (Vi) is a line-oriented editor.

Re: [R] open source editor for r for beginners

2011-09-20 Thread Bert Gunter
Marion: You should always first search CRAN for such queries. Had you done so, you would have been led to: http://www.sciviews.org/_rgui/ There is an extensive list of editors/IDE's there. -- Bert On Tue, Sep 20, 2011 at 6:26 AM, Marion Wenty marion.we...@gmail.comwrote: Hello all, I am

Re: [R] closeness of codes

2011-09-20 Thread Henri-Paul Indiogine
Hi Jean and Jim! Thanks for your suggestions. Best, Henri-Paul -- Henri-Paul Indiogine Curriculum Instruction Texas AM University TutorFind Learning Centre Email: hindiog...@gmail.com Skype: hindiogine Website: http://people.cehd.tamu.edu/~sindiogine

Re: [R] question concerning the acf function

2011-09-20 Thread Jean-Christophe BOUËTTÉ
Hi Samir, I do vaguely understand your intention. However I'm not sure taking the mean of acf's makes any sense. I do not know what your final goal is (what do you want to do with the data?) but here is a suggestion. Instead of trying to aggregate acfs computed on different series, why don't you:

[R] Boxplots from 4 dimensional array

2011-09-20 Thread Tarmo Remmel
Hello list members, I am working with simulated data for landscape pattern analysis. I have 1000 replicates of binary (2 colour) gridded landscapes at each combination of 9 levels of class proportion and 11 levels of spatial autocorrelation. The results are stored in an array as follows:

[R] Using method = aic with pspline survreg (survival library)

2011-09-20 Thread Carina Salt
Hi everybody. I'm trying to fit a weibull survival model with a spline basis for the predictor, using the survival library. I've noticed that it doesn't seem to be possible to use the aic method to choose the degrees of freedom for the spline basis in a parametric regression (although it's fine

Re: [R] open source editor for r for beginners

2011-09-20 Thread Jack Siegrist
Marion Wenty wrote: ...Could anyone recommend an editor that is suitable for beginners?... I had trouble with this for a long time. I tried several different programs, but couldn't get any to work properly—they were either too complicated or broken. I recently started using Notepad++ with

[R] Problem with legend

2011-09-20 Thread Komine
HI, This code is part of a code I used to do a linear regression: points(var1~var2,data=Regress,pch=21,bg=grey) reg11-lm(var1~var2,data=Regress) abline(lm(var1~var2,data=Regress),lty=2,lwd=2,col=grey) legend(topleft,legend= c(NDII from composite, y= 0.0007x - 0.1156,expression(paste(r^2 ==

[R] means across list of data frames

2011-09-20 Thread Matthew Finkbeiner
I have a list of data frames like the following: set.seed(123) a- data.frame(x=runif(10), y = runif(10), sample = seq(1,10)) b- data.frame(x=runif(10), y = runif(10), sample = seq(1,10)) L- list(a,b) All data frames in the list have the same dimensions. I need to calculate the sample means for

[R] Problems using predict from GAM model averaging (MuMIn)

2011-09-20 Thread Vernon Visser
I am struggling to get GAM model predictions from the top models calculated using model.avg in the package MuMIn. My model looks something like the following: gamp - gam(log10(y)~s(x1,bs=tp,k=3)+s(x2,bs=tp,k=3)+ s(x3,bs=tp,k=3)+s(x4,bs=tp,k=3)+s(x5,bs=tp,k=3)+

[R] rtmvnorm performance issues

2011-09-20 Thread Martin C. Steinwand
When sampling from a multi-variate truncated normal using rtmvnorm from the tmvnorm-package, I experience extreme performance differences between two of my computers. On my laptop computer, draws take ~5s, on my desktop ~30s. I need to run MCMCs with repeat calls to rtmvnorm on my desktop. The

[R] Multivariate spline regression and predicted values

2011-09-20 Thread Max Farrell
Hello, I am trying to estimate a multivariate regression of Y on X with regression splines. Y is (nx1), and X is (nxd), with d1. I assume the data is generated by some unknown regression function f(X), as in Y = f(X) + u, where u is some well-behaved regression error. I want to estimate f(X) via

Re: [R] Problem with legend

2011-09-20 Thread PtitBleu
Maybe by adding col=c(grey,white,white), bg=white but not sure ... Have a nice end of day, Ptit Bleu. -- View this message in context: http://r.789695.n4.nabble.com/Problem-with-legend-tp3826973p3827120.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] fitting a sinus curve

2011-09-20 Thread maaariiianne
Dear all, Thanks a lot for the help. It worked very well in the end. Best regards, Marianne -- View this message in context: http://r.789695.n4.nabble.com/fitting-a-sinus-curve-tp3700833p3827044.html Sent from the R help mailing list archive at Nabble.com.

[R] R: open source editor for r for beginners

2011-09-20 Thread Nai Ruscone Marta
Maybe you can use Rcmdr http://socserv.mcmaster.ca/jfox/Misc/Rcmdr/ It is a very easy program. Da: r-help-boun...@r-project.org [r-help-boun...@r-project.org] per conto di Jack Siegrist [jack...@eden.rutgers.edu] Inviato: martedì 20 settembre 2011 16.07

Re: [R] Problem with legend

2011-09-20 Thread Sarah Goslee
You're passing a vector of length 3 to the legend argument of legend(), so R is assuming that you have three things you want to display. There are two alternatives: 1. Provide legend() a legend that's a single character vector. 2. Specify that you don't want symbols for the last two of the three

Re: [R] open source editor for r for beginners

2011-09-20 Thread Steve Lianoglou
I just wanted to second Rstudio: http://rstudio.org/ Honestly, try this first -- it's an easy install, it just works, and there's no real learning curve to the editor itself. Very n00b friendly. -steve On Tue, Sep 20, 2011 at 9:28 AM, R. Michael Weylandt michael.weyla...@gmail.com wrote:

Re: [R] Multivariate spline regression and predicted values

2011-09-20 Thread Simon Wood
One possibility is library(mgcv) ## isotropic thin plate spline smoother b - gam(Y~s(X[,1],X[,2])) predict(b,newdata=list(X=W)) ## tensor product smoother b - gam(Y~te(X[,1],X[,2])) predict(b,newdata=list(X=W)) ## variant tensor product smoother b - gam(Y~t2(X[,1],X[,2]))

[R] Odp: means across list of data frames

2011-09-20 Thread Petr PIKAL
Hi I have a list of data frames like the following: set.seed(123) a- data.frame(x=runif(10), y = runif(10), sample = seq(1,10)) b- data.frame(x=runif(10), y = runif(10), sample = seq(1,10)) L- list(a,b) All data frames in the list have the same dimensions. I need to calculate the

Re: [R] Help writing basic loop

2011-09-20 Thread David L Carlson
You did ask for a loop, but if you are willing to consider sapply(), the result you want can be obtained with a single (admittedly long) command: slope-sapply(1:100, function(x) lm(c(rnorm(1, mean=.01, sd=.001), rnorm(1, mean=.1, sd=.01))~c(10,400))$coefficients[2]) head(slope) c(10, 400)

Re: [R] open source editor for r for beginners

2011-09-20 Thread Ken Hutchison
Rstudio and Rcmdr are very popular and for good reason, find a good book while the latter is installing though. IF you are using linux, rkward is fantastic to woRk with. Ken Hutchison On Tue, Sep 20, 2011 at 11:21 AM, Steve Lianoglou mailinglist.honey...@gmail.com wrote: I just

Re: [R] Problem with legend

2011-09-20 Thread Komine
Thank you Sarah and Petit bleu for your help. I solved my problem with the code of Sarah. Komine -- View this message in context: http://r.789695.n4.nabble.com/Problem-with-legend-tp3826973p3827461.html Sent from the R help mailing list archive at Nabble.com.

[R] Converting ID Numbers to Unique ID Number

2011-09-20 Thread Totally Inept
First off, let me apologize for the elementary question. I'm obviously a novice. Here's a stripped version of my problem. March foreign id = 1234, my id = 1 foreign id = 1235, my id = 2 foreign id = 1236, my id = 3 So we are adding new people for April, and things don't necessarily come in

Re: [R] package documentation of S4 methods

2011-09-20 Thread Hassaan Aamir
El Gorgonzola elgorgonzola at hotmail.com writes: My question: how do you document methods of S4-classes in a package? It works fine for the method show but it does not work for showall, for which I had to define the generic function first. What can I do to fix this, or is it better to just

Re: [R] Converting ID Numbers to Unique ID Number

2011-09-20 Thread Sarah Goslee
A reproducible example would be useful, as yours isn't entirely clear. But maybe something like this? id.info - data.frame(foreign=sort(unique(foreign.id)), local=1:length(unique(foreign.id))) and then use merge() to combine that with your actual data. Sarah On Tue, Sep 20, 2011 at 11:50 AM,

Re: [R] Converting ID Numbers to Unique ID Number

2011-09-20 Thread jim holtman
something like this should work: oldIDs - c(1234, 1235, 1236) newIDs - c(5000, 1234, 7000, 1236) # really new ones -- don't match the old ones (reallyNew - setdiff(newIDs, oldIDs)) [1] 5000 7000 # assign these back to the oldIDs for the next month (oldIDs - c(oldIDs, reallyNew)) [1] 1234

Re: [R] Boxplots from 4 dimensional array

2011-09-20 Thread Jean V Adams
Tarmo Remmel wrote on 09/20/2011 09:51:45 AM: Hello list members, I am working with simulated data for landscape pattern analysis. I have 1000 replicates of binary (2 colour) gridded landscapes at each combination of 9 levels of class proportion and 11 levels of spatial autocorrelation.

[R] help in interpreting paired t-test

2011-09-20 Thread Pedro Mardones
Dear all; A very basic question. I have the following data: A - 1/1000*c(347,328,129,122,18,57,105,188,57,257,53,108,336,163, 62,112,334,249,45,244,211,175,174,26,375,346,153,32,

[R] ksvm and predict

2011-09-20 Thread Juan
Hello, I am using the kernlab package to do regression. I have a data frame called Data6 which looks like this: head(Data6) WA PO ZA ZB ZC ZD KL 1 2.955447 6.378324 14.10622 0.134343 0.247120 0.734810 4.05988 2 2.939718 6.344122 14.03528 0.127512

[R] randomForest - NaN in %IncMSE

2011-09-20 Thread Katharine Miller
Hi I am having a problem using varImpPlot in randomForest. I get the error message Error in plot.window(xlim = xlim, ylim = ylim, log = ) : need finite 'xlim' values When print $importance, several variables have NaN under %IncMSE. There are no NaNs in the original data. Can someone help

Re: [R] help in interpreting paired t-test

2011-09-20 Thread Timothy Bates
Yes, in over 3/4s of the data points A is B… which suggests the A measure is reading higher than the B measuring system. length(A[AB])/length(A) On 20 Sep 2011, at 6:46 PM, Pedro Mardones wrote: Dear all; A very basic question. I have the following data:

Re: [R] help in interpreting paired t-test

2011-09-20 Thread Marc Schwartz
On Sep 20, 2011, at 12:46 PM, Pedro Mardones wrote: Dear all; A very basic question. I have the following data: A - 1/1000*c(347,328,129,122,18,57,105,188,57,257,53,108,336,163,

[R] NLS error

2011-09-20 Thread Diviya Smith
Hello there, I am using NLS for fitting a complex model to some data to estimate a couple of the missing parameters. The model is - y ~ (C+((log(1-r))*exp(-A*d)*(-1+r+exp(d*(A-B)))/(r*(-A*d+d*B+log(1-r) where A, B and C are unknown. In order to test the model, I generate data by setting

Re: [R] help in interpreting paired t-test

2011-09-20 Thread Jean V Adams
Pedro Mardones wrote on 09/20/2011 12:46:54 PM: Dear all; A very basic question. I have the following data: A - 1/1000*c(347,328,129,122,18,57,105,188,57,257,53,108,336,163,

Re: [R] help in interpreting paired t-test

2011-09-20 Thread Ted Harding
As can be seen by plotting as follows: plot(A,B,pch=+,col=blue) ## The raw data plot(A,B-A,pch=+,col=blue) ## The differences versus A lines(c(0,0.7),c(0,0)) Ted. On 20-Sep-11 17:54:15, Timothy Bates wrote: Yes, in over 3/4s of the data points A is B… which suggests the A measure is

[R] How to transfer variable names to column names?

2011-09-20 Thread Vining, Kelly
Hello R users, I have a set of data frames for which I am tallying row numbers, as shown below. nrow(mC_Explant) [1] 14480 nrow(mC_Callus) [1] 23320 nrow(mC_RegenPlant) [1] 8108 etc. I want to create a new data frame which has the variable names as column headings, and then a single row

Re: [R] Duplicate Rows in xts

2011-09-20 Thread R. Michael Weylandt
Please keep the list in the loop for the archives: The data provided looks like this: V = structure(list(V1 = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = 02/22/2011, class = factor), V2 = structure(c(1L, 1L, 2L,

Re: [R] How to transfer variable names to column names?

2011-09-20 Thread Sarah Goslee
Hi Kelly, c() creates a vector. You need data.frame() instead. dfIntron - c(mC_Explant=nrow(mC_Explant), mC_Callus=nrow(mC_Callus), mC_RegenPlant=nrow(mC_RegenPlant)) # set colnames simultaneously. Sarah On Tue, Sep 20, 2011 at 2:23 PM, Vining, Kelly kelly.vin...@oregonstate.edu wrote: Hello

Re: [R] NLS error

2011-09-20 Thread Jean V Adams
Diviya Smith wrote on 09/20/2011 01:03:22 PM: Hello there, I am using NLS for fitting a complex model to some data to estimate a couple of the missing parameters. The model is - y ~ (C+((log(1-r))*exp(-A*d)*(-1+r+exp(d*(A-B)))/(r*(-A*d+d*B+log(1-r) where A, B and C are unknown.

Re: [R] Strplit code

2011-09-20 Thread William Dunlap
In S+ do.call's first argument must be a character string that gives the name of the function, so replace do.call(rbind, ...) with do.call(rbind, ...) Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com From: Santosh [mailto:santosh2...@gmail.com] Sent: Tuesday, September 20, 2011 2:55 AM

Re: [R] How to transfer variable names to column names?

2011-09-20 Thread R. Michael Weylandt
The following untested code might also be of some help to you: x = data.frame(x = 1:5) y = data.frame(y = 1:10) z = data.frame(z = 1:3) a = rnorm(50) b = function(x) x^2 makeRowFrame - function(){ n - ls(envir = .GlobalEnv) tempFunc - function(VARIABLE){ VARIABLEM - get(VARIABLE)

Re: [R] Multivariate spline regression and predicted values

2011-09-20 Thread Max Farrell
Thank you for the reply, it looks like the second option (te) will work perfectly! Max On Tue, Sep 20, 2011 at 2:39 PM, Max Farrell ma...@umich.edu wrote: One possibility is library(mgcv) ## isotropic thin plate spline smoother b - gam(Y~s(X[,1],X[,2])) predict(b,newdata=list(X=W))

[R] A question regarding random effects in 'aov' function

2011-09-20 Thread karena
Hi, I am doing an analysis to see if these is tissue specific effects on the gene expression data . Our data were collected from 6 different labs (batch effects). lab 1 has tissue type 1 and tissue type 2, lab 2 has tissue 3, 4,5,6. The other labs has one tissue type each. The 'sample' data is

[R] R Programming and Development - EMBL Heidelberg, 28-29 November 2011

2011-09-20 Thread Laurent Gatto
Might be of interest to list subscribers: EMBL Advanced Course R Programming and Development EMBL Heidelberg, Germany Monday 28 November - Tuesday 29 November 2011 The course will focus on two aspects of R programming and development. In the first part, we will introduce object-oriented

[R] tcltk freezes R

2011-09-20 Thread tm
Hi there, I have the following problem on my macbook air with mac os x lion on it. when any program tries to load the tcltk library the R GUI or R command line freezes. also happens if I just use library(tcltk) changing versions of tcltk and/or R doesn't help. currently I have the following: R

[R] Install Location on Linux Red Hat

2011-09-20 Thread Darrel Barbato
Hi, I'm having some difficulty installing R on our server which is running RHEL (Red Hat Enterprise Linux) 5.2. I'm using RPM (Red Hat Package Manager) and by default it installs R in /usr/bin. Unfortunately due to a very small partition size, I have run out of space in this directory. I was

[R] Can R be installed in a Hyper-V environment?

2011-09-20 Thread McDonough, Tim
We are contemplating the installation of R on a Windows server with Hyper-V but we can't find any information on whether it can be done. This transmission is intended solely for the person or organization to whom it is addressed and it may contain

Re: [R] NLS error

2011-09-20 Thread Diviya Smith
I dont think *r* is related to the problem. I am not trying to estimate *r* and so basically I am giving the model the correct value of *r* and so log(1-r) should not go to infinity. For test data, I generate data from the same model and add noise (using *r norm*), with the following parameters -

[R] Works from CLI but not from prompt

2011-09-20 Thread Henri-Paul Indiogine
Greegings! Any idea why this works from the command line, but not from a source file? This is driving me (more) insane. regexp - [Aa]ccountability Thanks! -- Henri-Paul Indiogine Curriculum Instruction Texas AM University TutorFind Learning Centre Email: hindiog...@gmail.com Skype:

Re: [R] Install Location on Linux Red Hat

2011-09-20 Thread Marc Schwartz
On Sep 20, 2011, at 4:02 PM, Darrel Barbato wrote: Hi, I'm having some difficulty installing R on our server which is running RHEL (Red Hat Enterprise Linux) 5.2. I'm using RPM (Red Hat Package Manager) and by default it installs R in /usr/bin. Unfortunately due to a very small partition

Re: [R] help in interpreting paired t-test

2011-09-20 Thread Ted Harding
Further to the plot suggested below, the plot plot(log(A),log(B/A),pch=+,col=blue) reveals an interesting structure to the data. Distinct curved sequences are clearly visible. While their curved form is a consequence of the fact that, for large A, A/B is close to 1 and so they tend to approach

Re: [R] Works from CLI but not from prompt

2011-09-20 Thread Sarah Goslee
What works? Assigning a string to a function, thus replacing the function in your search path? Or is that what doesn't work? What do you expect? What are you trying to do? Using what commands? Sarah On Tue, Sep 20, 2011 at 6:19 PM, Henri-Paul Indiogine hindiog...@gmail.com wrote: Greegings!

Re: [R] Works from CLI but not from prompt

2011-09-20 Thread Sarah Goslee
My apologies: not the name of a function, despite ?regexp having a return value. But the rest of my questions are still relevant. On Tue, Sep 20, 2011 at 6:32 PM, Sarah Goslee sarah.gos...@gmail.com wrote: What works? Assigning a string to a function, thus replacing the function in your search

Re: [R] Works from CLI but not from prompt

2011-09-20 Thread Henri-Paul Indiogine
Hi Sarah! 2011/9/20 Sarah Goslee sarah.gos...@gmail.com: What works? Assigning a string to a function, thus replacing the function in your search path? Bad choice for character variable name on my part. How about this? pattern - [Aa]ccountability If I enter this at the CLI and then type

Re: [R] Works from CLI but not from prompt

2011-09-20 Thread Henri-Paul Indiogine
My objective is to define a pattern for a grep() statement. Thanks, Henri-Paul -- Henri-Paul Indiogine Curriculum Instruction Texas AM University TutorFind Learning Centre Email: hindiog...@gmail.com Skype: hindiogine Website: http://people.cehd.tamu.edu/~sindiogine

Re: [R] Works from CLI but not from prompt

2011-09-20 Thread R. Michael Weylandt
Can you perhaps provide us a minimal working script in which this assignment doesn't happen? If it really is just the line pattern - [Aa]ccountability in the main body of the script, I can't for the life of me guess why it wouldn't work. General keywords that come to mind are things like

Re: [R] Works from CLI but not from prompt

2011-09-20 Thread David Winsemius
On Sep 20, 2011, at 6:49 PM, Henri-Paul Indiogine wrote: My objective is to define a pattern for a grep() statement. Thanks, Henri-Paul You are not illustrating the problem with enough detail to determine the source of your errors. The errors do not appear when tested in what appears to

[R] Specifying Start/End Dates for X-axis Range in plot()/xyplot()

2011-09-20 Thread Rich Shepard
I'm having difficulty finding the syntax to use to specify the beginning and ending dates for the x-axis while plotting a zoo object. I thought that I had seen a message on this list that used start=as.Date(...) end=as.Date(...), but I cannot find that message. I've tried ?plot, ?plotxy,

Re: [R] NLS error

2011-09-20 Thread Ben Bolker
Diviya Smith diviya.smith at gmail.com writes: I dont think *r* is related to the problem. I am not trying to estimate *r* and so basically I am giving the model the correct value of *r* and so log(1-r) should not go to infinity. For test data, I generate data from the same model and

Re: [R] Works from CLI but not from prompt

2011-09-20 Thread Henri-Paul Indiogine
Greetings! 2011/9/20 David Winsemius dwinsem...@comcast.net: There is probably an environment/scoping problem as you stated. I am using ESS and org-mode. I started a new R code block and the problem disappeared. Thanks for your kind feedback. Henri-Paul -- Henri-Paul Indiogine Curriculum

Re: [R] Tabulating Baseline Characteristics on specific observations

2011-09-20 Thread justin jarvis
That still discards the other data columns. For example, in the data frame V1 V2 V3 V4 1 1 1 NA 1 2 1 NA 1 1 3 1 NA 1 1 4 1 11 1 5 1 11 1 Suppose I was running a regression using V1 and V2. R will remove rows 2 and 3 due to the NA. I would like a way to look at only the

Re: [R] Strplit code

2011-09-20 Thread MK
Pardon my ignorance, but why is the do.call necessary? why not just execute the rbind function? What's the advantage in putting it in a do.call wrapper? On Sep 20, 2011, at 2:44 PM, William Dunlap wdun...@tibco.com wrote: In S+ do.call's first argument must be a character string that

Re: [R] Tabulating Baseline Characteristics on specific observations

2011-09-20 Thread William Dunlap
You could use the na.action function on the fitted object to see which observations were omitted. E.g., let's make a data.frame that we can actually do some regressions with and try na.action(): d - data.frame(V1=11:15, V2=log(c(1,NA,NA,4,5)), V3=sqrt((-1):3), V4=sin(1:5)) Warning message:

Re: [R] adding labels to x,y points

2011-09-20 Thread B77S
I don't have access to your alon.txt file (see ?dput for future posts), but... I'm pretty sure info you want isn't in row.names(colon[1:2]) it should just be text(x,y, label = colon[1:20]) ?? HTH baumeist wrote: Hi, I am new to R. I have a matrix that I have assigned to the object

Re: [R] Strplit code

2011-09-20 Thread William Dunlap
Look at the help file for do.call. It is most useful when you don't know how many arguments will be given to the function you are calling. E.g., if you know that the list x is always 3 long then you can do rbind(x[[1]], x[[2]], x[[3]]) to make a matrix out of the components, just as

Re: [R] A question regarding random effects in 'aov' function

2011-09-20 Thread Weidong Gu
If different labs tested different tissue.types, I am not sure you can effectively partition variance between labs(batches) and tissue.types. Weidong Gu On Tue, Sep 20, 2011 at 2:14 PM, karena dr.jz...@gmail.com wrote: Hi, I am doing an analysis to see if these is tissue specific effects on

Re: [R] Tabulating Baseline Characteristics on specific observations

2011-09-20 Thread David Winsemius
On Sep 20, 2011, at 7:37 PM, justin jarvis wrote: That still discards the other data columns. For example, in the data frame V1 V2 V3 V4 1 1 1 NA 1 2 1 NA 1 1 3 1 NA 1 1 4 1 11 1 5 1 11 1 Suppose I was running a regression using V1 and V2. R will remove

[R] package / function for monitoring processes?

2011-09-20 Thread Benjamin Tyner
Hi I recall running across a function a while back which would return information about running processes (such as their cpu and memory usage), but I cannot seem to locate it. Wondering if someone would be kind enough to refresh my memory. I vaguely recall it was parsing the output of the

  1   2   >