Re: [R] Deleting the last value of a vector

2011-04-18 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 18.04.2011 04:51:20: Or perhaps even more parsimoniously (by a couple of characters) - r - c(1, 2, 3, 4, 5) r2-r[-length(r)] Maybe even shorter head(x,-1) Regards Petr Min-Han On Sun, Apr 17, 2011 at 10:23 PM, Daisy Englert Duursma

[R] Odp: boxplot with 2 treatments and 2 variables (with 2 corresponding y-axes)

2011-04-18 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 15.04.2011 16:20:23: Hi, I am a complete newcomer to R and although I can plot standard box-plots I am struggling with this... I have two treatments - A B, and 2 variables 1 2. I want to compare boxplots of variable 1 with variable 2 for

[R] time dependent hazard ratios

2011-04-18 Thread array chip
Hi, I am new to time-dependent Cox model to estimate time dependent hazard ratios. Let me use aml dataset from survival package: aml3-survSplit(aml2,cut=c(5,10,20),end=time,start=start, event=status,episode=i) If I want to esimate hazard ratio for each of the time intervals 0-5, 5-10,

[R] Windows 7, update.packages problem: unable to move temporary installation?

2011-04-18 Thread Tal Galili
Hello all, I am using R 2.13.0 with windows 7, after giving my user full privileges to the R folder (as described herehttp://www.r-statistics.com/2011/04/how-to-upgrade-r-on-windows-7/ ). This allows me to install new packages just fine. However, when using update.packages(), to update existing

Re: [R] Deleting the last value of a vector

2011-04-18 Thread helin_susam
if you have a vector like as follows; r=c(1,2,3,4,5) then use r2=r[1:length(r)-1] -- View this message in context: http://r.789695.n4.nabble.com/Deleting-the-last-value-of-a-vector-tp3456363p3456388.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Windows 7, update.packages problem: unable to move temporary installation?

2011-04-18 Thread Joshua Wiley
Hi Tal, Three thoughts, not sure if any of them would pan out in your case. 1) Run R as an administrator 2) Shift your library location out of Program Files 3) just use install.packages(MASS), the only downside is you'd have to know the packages you wanted to update rather than just

[R] Location of libraries in Windows

2011-04-18 Thread Mario Valle
I'm preparing to install 2.13, so I need a clarification about package location on disk. On window the packages I have installed are under C:\Users\mvalle\R\win-library\2.12 and the ones that come with R are under C:\Program Files\R\library If I execute update.packages() from the R gui, it

Re: [R] Location of libraries in Windows

2011-04-18 Thread Mario Valle
The best method to solve a problem is to send a mail to the list. One second later you find the problem has just been solved for someone else... The solution is here: http://www.r-statistics.com/2011/04/how-to-upgrade-r-on-windows-7/ Anyway, my question about folder location remains. Thanks!

Re: [R] RJMCMC.

2011-04-18 Thread Oscar Rueda
Dear Marcus, As others have pointed out, RJaCGH uses Reversible Jump MCMC to fit a non-homogeneous Hidden Markov Model to array CGH data, but it can be used for other applications too. It can be easily adapted to homogeneous HMMs and even to mixed models. It also contains implementations of

Re: [R] Box plot with 5th and 95th percentiles instead of 1.5 * IQR: problems implementing an existing solution...

2011-04-18 Thread Uwe Ligges
On 17.04.2011 13:08, Paul Raftery wrote: Hi all, I'm just getting started with R and I would appreciate some help. I'm having trouble creating a boxplot with whiskers at the 95th and 5th percentiles instead of at 1.5 * IQR. I have read the relevant documentation, and checked existing mails on

Re: [R] Location of libraries in Windows

2011-04-18 Thread Uwe Ligges
On 18.04.2011 09:29, Mario Valle wrote: The best method to solve a problem is to send a mail to the list. One second later you find the problem has just been solved for someone else... The solution is here: http://www.r-statistics.com/2011/04/how-to-upgrade-r-on-windows-7/ Anyway, my question

[R] mapply to lapply

2011-04-18 Thread Alaios
Dear all, I would like to ask your help concerning converting a mapply function to lapply. The reason is that I would like to use mclapply which requires lapply syntax. The command I would like to convert is:

Re: [R] Help me create a hyper-structure

2011-04-18 Thread Alaios
It seems you were right. Now I can easily access my struct and substruct like this # all.str[[1]]] Gives access to the first struct of per.sr.struct which containts 101 times the xorder,yorder,estimation.sr # all.str[[1]][[2]] Gives access to the second substruct of all.str[[1]] #

Re: [R] Box plot with 5th and 95th percentiles instead of 1.5 * IQR: problems implementing an existing solution...

2011-04-18 Thread Paul Raftery
Thank you both. Both solutions worked fine, but I'll probably end up going with fixInNamespace(boxplot.default, graphics) as it allows me to use previously written script without making any further changes. Thanks again, Regards, Paul 2011/4/18 Uwe Ligges lig...@statistik.tu-dortmund.de On

Re: [R] URL Scan

2011-04-18 Thread Barry Rowlingson
On Sun, Apr 17, 2011 at 11:56 PM, jmsc michaelfp...@gmail.com wrote: The site does not require a login/password. Another way to access the first site would be to go to the second site, click Connecticut, click Canterbury, CT, enter the online database, click search under Query by Location with

Re: [R] mapply to lapply

2011-04-18 Thread Andreas Borg
My solution would be to use an index variable that goes from 1 to the number of rows that are to be processed, along with a helper function which calls Fwithcellvalue with the suitable arguments: F2[i+1,j+1]-sum(lapply(1:nrow(cells), function(rowInd)

Re: [R] different colors in a segplot centers (package latticeExtra)

2011-04-18 Thread Deepayan Sarkar
On Mon, Apr 18, 2011 at 4:10 AM, barbara costa rbarbar...@gmail.com wrote: Hi, how can I change colors in the centers of my segplot? I'm not interested in coloring the lines (Standard error limits) but the centers (means)?  here's my code: segplot(reorder(factor(Species), MeanBiom)  ~

Re: [R] regression and lmer

2011-04-18 Thread Iasonas Lamprianou
Dear all,  I hope this is the right place to ask this question. I am reviewing a research where the analyst(s) are using a linear regression model. The dependent variable (DV) is a continuous measure. The independent variables (IVs) are a mixture of linear and categorical variables. The

Re: [R] Deleting the last value of a vector

2011-04-18 Thread Allan Engelhardt
This is unlikely to be the kind of operation where speed is essential, but nevertheless on my build of 2.14.0 (with byte compiled base packages): stopifnot(getRversion()= 2.14) library(compiler) f1- function (x, n) head(x, length(x) - n)# suggested by baptiste auguie f2- function (x, n) x[

Re: [R] Create matrices for time series

2011-04-18 Thread mathijsdevaan
Thanks a lot! Given the calculations below, I would like to generate a data.frame in which the value of case 8029 (i) in 1998 = sum (element c(i,j) * element final1(1,j) * 1st eigenvalue 1998 * element final2 (i,j)) * (1/sum final2(i)) in which j are all other cases in year 1998 and i IS NOT j?

Re: [R] covariance matrix: a erro and simple mixed model question, but id not know answer sorry

2011-04-18 Thread Maya Joshi
Let me clarify the output I want to create: Source X1 (var) X2 (var) X1X2 (cov) gen var(X1) var(X2) cov(x1X2) block var(X1) var(X2) cov(x1x2) error/ res

Re: [R] as.Date error

2011-04-18 Thread David Winsemius
On Apr 17, 2011, at 7:24 PM, Wonjae Lee wrote: Thank you for replying the as.Date error question. I have one more question as below. I used cbind command, and data x changed, 2010-11-16 to 14929, 2010-11-17 to 14930. What happened to them? What should I do to see -mm-dd format data?

[R] (no subject)

2011-04-18 Thread Ramnath R
Hai From which CRAN mirror can get the package ‘LPP2005REC’ Ram [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Color Key in RColorBrewer

2011-04-18 Thread chakri
Jsut a quick note - I found answer to my query. color scale can be retained by break command breaks=seq(0,1,0.025) -- View this message in context: http://r.789695.n4.nabble.com/Color-Key-in-RColorBrewer-tp3455953p3456955.html Sent from the R help mailing list archive at Nabble.com.

[R] XML Packge for Windows XP and R 2.12.

2011-04-18 Thread kschaber
Hello, I am looking for the XML Package for Windows or any package, which would enable me to use the function xmlTreeParse. In a thread dating from 2001, the same question is raised: Griffith Feeney wrote: Has anyone gotten the XML package (R News 1-1:24) with R running on Windows (95 or 98

Re: [R] (no subject)

2011-04-18 Thread Philipp Pagel
On Mon, Apr 18, 2011 at 04:11:57PM +0530, Ramnath R wrote: Hai From which CRAN mirror can get the package ?LPP2005REC? As the first hit of a google search for LPP2005REC told me it is not a package but a dataset in package timeSeries. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für

Re: [R] mapply to lapply

2011-04-18 Thread Alaios
Dear Andreas, I would like to thank you for your reply. I have tried two alternatives but none of the two worked out: F2[i+1,j+1]-sum(lapply(1:nrow(cells), function(rowInd) Fwithcellvalue(i=i,j=j,a=cells[rowInd,2],b=cells[rowInd,4],c=cells[rowInd,1],d=cells[rowInd,3],e=cells[rowInd,5]))) this

Re: [R] (no subject)

2011-04-18 Thread David Winsemius
On Apr 18, 2011, at 6:41 AM, Ramnath R wrote: Hai From which CRAN mirror can get the package ‘LPP2005REC’ What makes you think any CRAN mirror should have such package? -- David Winsemius, MD West Hartford, CT __ R-help@r-project.org mailing

[R] plot and lines with time series data

2011-04-18 Thread Fred
Dear all, I am doing some time series analysis with R now. The problem is, when I create a time series object using ts function, then after fitting the model, the predicted values cannot be plotted with ts object together using lines. ie. ts.series-ts(x,start, end) plot(ts.series)

Re: [R] plot and lines with time series data

2011-04-18 Thread Fred
Figure it out. Just make predicted value ts object as well. On Apr 18, 9:20 pm, Fred jianyun.fred...@gmail.com wrote: Dear all, I am doing some time series analysis with R now. The problem is, when I create a time series object using ts function, then after fitting the model, the predicted

Re: [R] XML Packge for Windows XP and R 2.12.

2011-04-18 Thread Prof Brian Ripley
On Mon, 18 Apr 2011, kscha...@rzg.mpg.de wrote: Hello, I am looking for the XML Package for Windows or any package, which would enable me to use the function xmlTreeParse. In a thread dating from 2001, the same question is raised: Wow, a deacde ago! Why don't you simply use your menus to

Re: [R] help in neural networks package for simple 1d tsa-prediction

2011-04-18 Thread c2r
I am also looking for a sample to predict values for a simple 1d time series. I did look at various library-samples as in neuralnet,AMORE,nnet,RSNNS,Qrnn,monmlp e.t.c. but did not find a simple 1d-sample that forecasts like in the following simple arima-sample: library(TSA) x =

Re: [R] mapply to lapply

2011-04-18 Thread Kenn Konstabel
On Mon, Apr 18, 2011 at 2:10 PM, Alaios ala...@yahoo.com wrote: Dear Andreas, I would like to thank you for your reply. I have tried two alternatives but none of the two worked out: F2[i+1,j+1]-sum(lapply(1:nrow(cells), function(rowInd)

Re: [R] plot and lines with time series data

2011-04-18 Thread Gabor Grothendieck
On Mon, Apr 18, 2011 at 7:20 AM, Fred jianyun.fred...@gmail.com wrote: Dear all, I am doing some time series analysis with R now. The problem is, when I create a time series object using ts function, then after fitting the model, the predicted values cannot be plotted with ts object together

Re: [R] Deleting the last value of a vector

2011-04-18 Thread Kenn Konstabel
On Mon, Apr 18, 2011 at 4:14 AM, helin_susam helin.su...@gmail.com wrote: if you have a vector like as follows; r=c(1,2,3,4,5) then use r2=r[1:length(r)-1] Umm ... this works and gives the intended answer but does so in an ugly way -- 1:length(r)-1 is equivalent to (1:length(r))-1 or

Re: [R] Stepwise Regression with no Origin

2011-04-18 Thread Zd Gibbs
Thanks for this help. I'll read the documentation and see if I can work through the problem. I actually look forward to Mr. Harrell's reply. I have been taught that stepwise is not a good approach to use and should be avoided at all costs, so he may give me a cogent argument. The problem I

Re: [R] regression and lmer

2011-04-18 Thread Mike Marchywka
Date: Mon, 18 Apr 2011 03:27:40 -0700 From: lampria...@yahoo.com To: r-help@r-project.org Subject: Re: [R] regression and lmer Dear all, I hope this is the right place to ask this question.   ( hotmail not marking your text sorry I can';t find

Re: [R] Deleting the last value of a vector

2011-04-18 Thread jim holtman
Why not use 'head' head(1:10, -1) [1] 1 2 3 4 5 6 7 8 9 head(1, -1) numeric(0) head(integer(0), -1) integer(0) On Mon, Apr 18, 2011 at 8:13 AM, Kenn Konstabel lebats...@gmail.com wrote: On Mon, Apr 18, 2011 at 4:14 AM, helin_susam helin.su...@gmail.com wrote: if you have a vector like as

[R] Rsquared for anova

2011-04-18 Thread Dorien Herremans
Thanks Dieter, Even if I use lm(), I get the following output: summary(fit)              Df  Sum Sq Mean Sq F value    Pr(F) nh1            1   324.0  323.99  139.13 2.2e-16 *** nh2            1   723.1  723.12  310.53 2.2e-16 *** nh3            1  1794.2 1794.21  770.49 2.2e-16 ***

[R] (no subject)

2011-04-18 Thread Ramnath R
Hai, Where can i get the dataset votes.repub Ram [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] (no subject)

2011-04-18 Thread Ramnath R
Hai i just wanted to know how we can find the package of a dataset, eg: how can i find the package in which the dataset *iris* is present Ram [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] altering identity column

2011-04-18 Thread Bodnar Laszlo EB_HU
Hi there, I have a huge dataframe containing 70,000 observations. I have filtered this dataframe (let it's name be transformed_dataframe) as I wanted to select only those observations which are greater than or equal to 60,001 regarding the very first identity column. So I have a transformed

Re: [R] Rsquared for anova

2011-04-18 Thread Dieter Menne
Dorien Herremans wrote: Even if I use lm(), I get the following output: summary(fit) Df Sum Sq Mean Sq F valuePr(F) nh11 324.0 323.99 139.13 2.2e-16 *** nh21 723.1 723.12 310.53 2.2e-16 *** nh31 1794.2 1794.21 770.49

Re: [R] searching for datasets; was: (no subject)

2011-04-18 Thread Uwe Ligges
Please use a sensible subject line. PLEASE do read the posting guide http://www.R-project.org/posting-guide.html In this case, the first hit found by Google tells us it is in cluster. Uwe Ligges On 18.04.2011 14:58, Ramnath R wrote: Hai, Where can i get the dataset votes.repub Ram

Re: [R] (no subject)

2011-04-18 Thread Uwe Ligges
On 18.04.2011 14:58, Ramnath R wrote: Hai i just wanted to know how we can find the package of a dataset, eg: how can i find the package in which the dataset *iris* is present Type ?iris Uwe Ligges Ram [[alternative HTML version deleted]]

Re: [R] (no subject)

2011-04-18 Thread David Winsemius
On Apr 18, 2011, at 8:58 AM, Ramnath R wrote: Hai i just wanted to know how we can find the package of a dataset, eg: how can i find the package in which the dataset *iris* is present ?data -- David Winsemius, MD West Hartford, CT __

Re: [R] (no subject)

2011-04-18 Thread Alexander Engelhardt
Am 18.04.2011 14:58, schrieb Ramnath R: Hai i just wanted to know how we can find the package of a dataset, eg: how can i find the package in which the dataset *iris* is present Ram Hi, if you have the package installed, go ?iris to find out which package it belongs to. If not, just

Re: [R] (no subject)

2011-04-18 Thread Ramnath R
Hai, Where can i get the dataset votes.repub Ram On Mon, Apr 18, 2011 at 4:11 PM, Ramnath R vrramn...@gmail.com wrote: Hai From which CRAN mirror can get the package ‘LPP2005REC’ Ram [[alternative HTML version deleted]] __

Re: [R] mapply to lapply

2011-04-18 Thread Alaios
Thanks you very much. You made it work! Cheers --- On Mon, 4/18/11, Kenn Konstabel lebats...@gmail.com wrote: From: Kenn Konstabel lebats...@gmail.com Subject: Re: [R] mapply to lapply To: Alaios ala...@yahoo.com Cc: R-help@r-project.org Date: Monday, April 18, 2011, 1:06 PM On Mon, Apr

[R] Modify rpart

2011-04-18 Thread Sutton-Charani
Hello every one, I am a PhD student in Statistics, for my work I had to modify the rpart code and use it to build some decision trees. I thought I managed, but I noticed some strangeness in the trees I got by using the modified rpart. I'd like to ask you if I did the right modification: In fact

Re: [R] (no subject)

2011-04-18 Thread Ramnath R
Hai i just wanted to know how we can find the package of a dataset, eg: how can i find the package in which the dataset *iris* is present Ram On Mon, Apr 18, 2011 at 6:02 PM, Ramnath R vrramn...@gmail.com wrote: Hai, Where can i get the dataset votes.repub Ram On Mon, Apr 18, 2011 at

Re: [R] (no subject)

2011-04-18 Thread David Winsemius
On Apr 18, 2011, at 8:58 AM, Ramnath R wrote: Hai, Where can i get the dataset votes.repub Time for you to do your own searching. -- David Winsemius, MD West Hartford, CT __ R-help@r-project.org mailing list

Re: [R] Help me create a hyper-structure

2011-04-18 Thread Ben Bolker
On 11-04-18 04:45 AM, Alaios wrote: It seems you were right. Now I can easily access my struct and substruct like this # all.str[[1]]] Gives access to the first struct of per.sr.struct which containts 101 times the xorder,yorder,estimation.sr # all.str[[1]][[2]] Gives access to the second

Re: [R] Rsquared for anova

2011-04-18 Thread Ben Bolker
Dorien Herremans dorien.herremans at ua.ac.be writes: Thanks Dieter, Even if I use lm(), I get the following output: summary(fit)              Df  Sum Sq Mean Sq F value    Pr(F) nh1            1   324.0  323.99  139.13 2.2e-16 *** nh2            1   723.1  723.12  310.53 2.2e-16

Re: [R] (no subject)

2011-04-18 Thread Uwe Ligges
This is a bug in the very recent version of the plyr package. Its maintainer has been notified and promised an update. Uwe Ligges On 17.04.2011 22:51, Bryan Hanson wrote: Is there any news on this issue? I have the same problem but on a Mac. I have upgraded R and updated the built

Re: [R] (no subject)

2011-04-18 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 18.04.2011 14:32:11: Hai, Where can i get the dataset votes.repub Ram Use your favourite browser, put R votes.repub in its search facilities and you shall be lucky enough to get it from first several hits. If you have installed R you can start

Re: [R] altering identity column

2011-04-18 Thread Ben Bolker
Bodnar Laszlo EB_HU Laszlo.Bodnar at erstebank.hu writes: [snip snip ] So I have a transformed dataframe now including 10,000 obeservations (from 60,001 - to 70,000) and if you send head(transformed_dataframe) into R it looks like this: [snip] Now is there a quick way to alter this

Re: [R] Rsquared for anova

2011-04-18 Thread Dorien Herremans
Omg Dieter, thanks so much... I just had to q() and R... that solved it :-) excellent! finally got the R2 :-) On 18 April 2011 15:12, Ben Bolker bbol...@gmail.com wrote: Dorien Herremans dorien.herremans at ua.ac.be writes: Thanks Dieter, Even if I use lm(), I get the following output:

Re: [R] reporting lme results

2011-04-18 Thread Ben Bolker
Pennell, Tanya tp241 at exeter.ac.uk writes: I have used lme4 and I have found a significant result when using anova to compare model 1 and model 2 (where I took out an interaction). The result looks like this: model.3: DIFFERENCE ~ (1 | MALE.ID) model.2: DIFFERENCE ~ MALE.SPECIES + (1 |

Re: [R] Help me create a hyper-structure

2011-04-18 Thread Duncan Murdoch
On 18/04/2011 4:45 AM, Alaios wrote: It seems you were right. Now I can easily access my struct and substruct like this # all.str[[1]]] Gives access to the first struct of per.sr.struct which containts 101 times the xorder,yorder,estimation.sr # all.str[[1]][[2]] Gives access to the second

Re: [R] Help me create a hyper-structure

2011-04-18 Thread Alaios
Thank you very much . That was really helpful. I will keep this email for future reference Regards --- On Mon, 4/18/11, Duncan Murdoch murdoch.dun...@gmail.com wrote: From: Duncan Murdoch murdoch.dun...@gmail.com Subject: Re: [R] Help me create a hyper-structure To: Alaios ala...@yahoo.com

Re: [R] mapply to lapply

2011-04-18 Thread Andreas Borg
Hi Alex, sorry, I wasn't aware that sum does not work with listst. replace lapply with sapply or place the call in unlist. Your second example does not work as you have to provide the additional arguments to the inner function in lapply: lapply(1:nrow(cells), function(rowInd, i, j), [your

Re: [R] altering identity column

2011-04-18 Thread David Winsemius
On Apr 18, 2011, at 9:02 AM, Bodnar Laszlo EB_HU wrote: Hi there, I have a huge dataframe containing 70,000 observations. I have filtered this dataframe (let it's name be transformed_dataframe) as I wanted to select only those observations which are greater than or equal to 60,001

[R] how to extract options for a function call

2011-04-18 Thread fisken
Hi, I'm having some difficulties formulating this question. But what I want, is to extract the options associated with a parameter for a function. e.g. method = c(Nelder-Mead, BFGS, CG, L-BFGS-B, SANN) in the optim function. So I would like to have a vector with c(Nelder-Mead, BFGS, CG,

[R] Help with cleaning a corpus

2011-04-18 Thread vintersorg123
Hi! I created a corpus and I started to clean through this piece of code: txt -tm_map(txt,removeWords, stopwords(spanish)) txt -tm_map(txt,stripWhitespace) txt -tm_map(txt,tolower) txt -tm_map(txt,removeNumbers) txt -tm_map(txt,removePunctuation) But something happpended: some of the documents

Re: [R] how to extract options for a function call

2011-04-18 Thread S Ellison
fisken torpedofis...@gmail.com 18/04/2011 14:56:56 But what I want, is to extract the options associated with a parameter for a function. Try ?formals S Ellison *** This email and any attachments are confidential. Any

Re: [R] how to extract options for a function call

2011-04-18 Thread Henrique Dallazuanna
Try this: For optim: eval(formals(optim)$method) For dist function: eval(body(dist)[[3]][[3]]) On Mon, Apr 18, 2011 at 10:56 AM, fisken torpedofis...@gmail.com wrote: Hi, I'm having some difficulties formulating this question. But what I want, is to extract the options associated with a

Re: [R] Geographic distance between lat-long points in R?

2011-04-18 Thread Scott Chamberlain
Hi Curt, Thanks for the help. According to that blogpost you sent, I am using the function gcd.hf using the Haversine formula. I wrapped it up in a function called CalcDists so that I can get a distance matrix between N sites. I don't know much about calculating distances, so does this

Re: [R] how to extract options for a function call

2011-04-18 Thread fisken
thanks 2011/4/18 S Ellison s.elli...@lgc.co.uk: fisken torpedofis...@gmail.com 18/04/2011 14:56:56 But what I want, is to extract the options associated with a parameter for a function. Try ?formals S Ellison *** This

Re: [R] side by side histogram after splitting data by year

2011-04-18 Thread Peter Ehlers
On 2011-04-17 16:29, jim holtman wrote: Will one of these do it for you: str(x) 'data.frame': 550 obs. of 5 variables: $ year: Factor w/ 2 levels one,two: 1 1 1 1 1 1 1 1 1 1 ... $ size: Factor w/ 2 levels large,small: 2 2 2 2 2 2 2 2 2 2 ... $ distance: num 30.9 121.5 46.1

Re: [R] (no subject)

2011-04-18 Thread Hadley Wickham
Yes, it's fixed and a new version of plyr has been pushed up to cran - hopefully will be available for download soon. In the meantime, I think you can fix it by running library(stats) before library(ggplot2). Hadley On Sun, Apr 17, 2011 at 3:51 PM, Bryan Hanson han...@depauw.edu wrote: Is

[R] From nested loop to mclapply

2011-04-18 Thread Alaios
Dear all, I am trying to find a decent way to speed up my code. So far I have used mclapply with really good results (parallel version of lapply). I have a nested loop that I would like to help me convert it to lapply for (i in seq(from=-1,to=1-2/ncol(sr),length=ncol(sr))){ for (j in

[R] Reorder a data frame according a column randomly reordered.

2011-04-18 Thread Mohammad Tanvir Ahamed
Hello all ,  I have a data frame like this  X1X2X3 11815 22916 331017 441118 551219 661320 771421 now i want to randomly reorder the variable X2  but the row element should be same  as for example  X1X2X3 12916 251219 331017 471421 561320 61815 741118 how can i do that ?? Hint :  this could

Re: [R] qvalue

2011-04-18 Thread Jim Silverton
I am using storey's qvalue package but I keep on getting errors. Why is this? qvalue(p, lambda=0.5)$pi0 [1] ERROR: p-values not in valid range. Error in qvalue(p, lambda = 0.5)$pi0 : $ operator is invalid for atomic vectors -- Thanks, Jim. [[alternative HTML version deleted]]

[R] Avoiding loop

2011-04-18 Thread Filoche
Hi everyone. I'm using matrix product such as : #Generate some data NCols = 5 NRows = 5 A = matrix(runif(NCols*NRows), ncol=NCols) B = matrix(runif(NCols*NRows), ncol=NCols) #First calculation R = A%*%B for(i in 1:100) { R = R%*%B } I would like to know if it was possible to

[R] Multiple Groups CFA in Lavaan

2011-04-18 Thread JTMajor
Hello, I am trying to do a multiple groups CFA in lavaan and I get the following error message: Error in cov(data.obs, use = pairwise) : 'x' is empty I'm not sure what this message is referring to, can anyone help me? Thanks -- View this message in context:

Re: [R] Using jitter function with differing variable lengths

2011-04-18 Thread Uwe Ligges
On 18.04.2011 04:11, Danica Horrell wrote: Hi, I am trying to make a scatter plot with 4 different categories using the jitter function. My code returns a variable length error and will not plot because my four categories have different numbers of samples. When I delete samples from my

Re: [R] Multiple Groups CFA in Lavaan

2011-04-18 Thread Uwe Ligges
On 18.04.2011 18:10, JTMajor wrote: Hello, I am trying to do a multiple groups CFA in lavaan and I get the following error message: Error in cov(data.obs, use = pairwise) : 'x' is empty I'm not sure what this message is referring to, can anyone help me? PLEASE do read the posting guide

Re: [R] Reorder a data frame according a column randomly reordered.

2011-04-18 Thread Uwe Ligges
On 18.04.2011 17:04, Mohammad Tanvir Ahamed wrote: Hello all , I have a data frame like this X1X2X3 11815 22916 331017 441118 551219 661320 771421 now i want to randomly reorder the variable X2 but the row element should be same as for example X1X2X3 12916 251219 331017 471421 561320

Re: [R] converting data.frame into a numeric ( integer) form

2011-04-18 Thread Uwe Ligges
On 17.04.2011 19:29, Haillie wrote: Hi Everyone, I am relatively new to R and would appreciate your help on this problem that I encontered this morning. When running an ordinal IRT model using Ratings package on R, I keep getting this error message. ord.out-ordrating(UNORD, burnin = 1000,

Re: [R] heatmap.2 - change column row locations; angle / rotate

2011-04-18 Thread Karl Brand
Hi Chakravarthy, [dont forget to Cc the list for useRs with the same Q.] If you're trying to reuduce the isze of your row or column labels, i think the following arguments of heatmap.2 {gplots} is what you want to adjust- 'cexCol' and 'cexRow'. Specifically on my question that you ask

Re: [R] qvalue

2011-04-18 Thread Peter Langfelder
On Mon, Apr 18, 2011 at 9:12 AM, Jim Silverton jim.silver...@gmail.com wrote: I am using storey's qvalue package but I keep on getting errors. Why is this? qvalue(p, lambda=0.5)$pi0 [1] ERROR: p-values not in valid range. Error in qvalue(p, lambda = 0.5)$pi0 :  $ operator is invalid for

Re: [R] altering identity column

2011-04-18 Thread jim holtman
row.names(transformed_dataframe) - NULL 2011/4/18 Bodnar Laszlo EB_HU laszlo.bod...@erstebank.hu: Hi there, I have a huge dataframe containing 70,000 observations. I have filtered this dataframe (let it's name be transformed_dataframe) as I wanted to select only those observations which

Re: [R] Print out data frames into neat images

2011-04-18 Thread Ista Zahn
Hi Santosh, There are at least three general possibilites: 1) latex (via xtable, Hmisc, r2lh, reporttools ...) 2) html (via xtable, r2lh, R2HTML, hwritter, HTMLUtils ...) 3) graphics (via gridExtra, tableplot ...) Best, Ista On Sun, Apr 17, 2011 at 11:46 PM, Santosh Srinivas

Re: [R] From nested loop to mclapply

2011-04-18 Thread Allan Engelhardt
Try help(expand.grid, package=base) for one way to create the combinations of (i,j) outside the loop, or perhaps vignette(nested, package=foreach) which does it automatically (rather: naturally). Allan On 18/04/11 16:53, Alaios wrote: Dear all, I am trying to find a decent way to speed up my

[R] How to remove the double or single quote from a string (unquote?)?

2011-04-18 Thread JingJiang Yan
Is there a function to get a string without a pair of quotes around it? I have several expressions like: glm(V12 ~ V3, family=binomial, data=df1) glm(V12 ~ V4, family=binomial, data=df1) ... glm(V12 ~ V8, family=binomial, data=df1) As you can see, the only differences among them are V3 ... V8.

Re: [R] altering identity column

2011-04-18 Thread Peter Ehlers
On 2011-04-18 06:15, Ben Bolker wrote: Bodnar Laszlo EB_HULaszlo.Bodnarat erstebank.hu writes: [snip snip ] So I have a transformed dataframe now including 10,000 obeservations (from 60,001 - to 70,000) and if you send head(transformed_dataframe) into R it looks like this: [snip]

Re: [R] How to remove the double or single quote from a string(unquote?)?

2011-04-18 Thread Gerrit Eichner
Hi, Jing Jiang, maybe as.formula( paste( V12 ~ V, i, sep = )) inside the call to glm() does what you need. Hth -- Gerrit On Tue, 19 Apr 2011, JingJiang Yan wrote: Is there a function to get a string without a pair of quotes around it? I have several expressions like: glm(V12 ~ V3,

Re: [R] How to remove the double or single quote from a string (unquote?)?

2011-04-18 Thread Allan Engelhardt
This should be a FAQ: you are confusing the value with its printed representation. Try print(paste(V, 3:8, sep=), quote=FALSE) to see that there are no quotes, and you may want to read up on help(as.formula, package=stats) which has the examples you are searching for. Allan On 18/04/11

[R] package sensitivity - sobol2002 indices

2011-04-18 Thread Duarte Viana
Hello all, In the following example, one sobol index for one parameter (the first order index for parameter b) is larger than 1. Shouldn´t the indices have a range of [0,1]? # Code for a decoupled approach example: X1-data.frame(a=runif(100,20,30),b=runif(100,0.1,0.5))

Re: [R] Using jitter function with differing variable lengths

2011-04-18 Thread Don McKenzie
A reproducible example would really help here. On 17-Apr-11, at 7:11 PM, Danica Horrell wrote: Hi, I am trying to make a scatter plot with 4 different categories using the jitter function. My code returns a variable length error and will not plot because my four categories have

Re: [R] Avoiding loop

2011-04-18 Thread Dennis Murphy
Hi: Try the expm package. Using your example, R = A%*%B for(i in 1:100) + { +R = R%*%B + } R [,1] [,2] [,3] [,4] [,5] [1,] 9.934879e+47 1.098761e+48 8.868476e+47 7.071831e+47 6.071370e+47 [2,] 1.492692e+48 1.650862e+48 1.332468e+48

[R] Fayez_how to make the colored panels in lattice xyplot

2011-04-18 Thread aziz4
Hi all, Consider I am want to lattice.xyplot following car's data for different brands and different gas mileages: car1 Toyota 40 car2 Toyota 38 car3 Honda 39 car4 Honda 32 car5 Honda 35 car6 Honda 32 car7 Mitsubishi 27 car8 Mitsubishi 34 car9 Mitsubishi 33 Now first I want to make three

Re: [R] Avoiding loop

2011-04-18 Thread Filoche
Hi sire. This is exactly what I was looking for, thank you. With regards, Phil -- View this message in context: http://r.789695.n4.nabble.com/Avoiding-loop-tp3457963p3458152.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] no solution yet, please help: extract p-value from mixed model in kinship package

2011-04-18 Thread Juliet Hannah
Maybe the pedigree is not set up correctly. If this is the case, the kinship matrix will not be constructed correctly. I see that in this example, the diagonal terms differ. diag(kmat) lmekin runs fine for me, and I can extract p-values with: lmekinfit - lmekin(...) pval -

[R] using aggregate when variable names contain spaces

2011-04-18 Thread Dimitri Liakhovitski
Hello! my data set has many variables. Unfortuantely, many of those variables contain spaces in their names. I need advice on: how to refer to variable names in the formula for aggregate. See example below: ### Generating example data set: mydate = rep(seq(as.Date(2008-12-01), length = 3, by =

[R] mcmc simulation

2011-04-18 Thread Peter Francis
Dear List, I am reading a method and am unsure how to do something similar, so have come here for advice! I have a observed value and a expected value generated from a null model. I am looking to see if observed - expected is significantly different from zero. So in the method in the paper

[R] Import dbf file

2011-04-18 Thread new2R
Hi I am new to R. I am trying to import dbf file using read.dbf but getting error message object read.dbf is not found. Please help in this regard. Thank you -- View this message in context: http://r.789695.n4.nabble.com/Import-dbf-file-tp3458366p3458366.html Sent from the R help mailing

Re: [R] URL Scan

2011-04-18 Thread jmsc
Ok thanks for the suggestion. I will look into that. On Mon, Apr 18, 2011 at 5:27 AM, Barry Rowlingson [via R] ml-node+3457010-2013527485-230...@n4.nabble.com wrote: On Sun, Apr 17, 2011 at 11:56 PM, jmsc [hidden email]http://user/SendEmail.jtp?type=nodenode=3457010i=0by-user=t wrote: The

[R] object read.dbf is not found

2011-04-18 Thread new2R
Hi I am new to R. I am trying to import dbf file using read.dbf but getting error message object read.dbf is not found. Please help in this regard. Thank you -- View this message in context: http://r.789695.n4.nabble.com/object-read-dbf-is-not-found-tp3458409p3458409.html Sent from the R

  1   2   >