[R] acf () and pacf()

2012-12-30 Thread Rashid Ameer
I have used acf() and pacf() in R to get the acf and pacf values at max/lag=20 but the output did not show the values associated with lag numbers. lag numbers is shown in decimals. -- Rashid Ameer View my recent publication at *

Re: [R] acf () and pacf()

2012-12-30 Thread Prof Brian Ripley
On 30/12/2012 07:47, Rashid Ameer wrote: I have used acf() and pacf() in R to get the acf and pacf values at max/lag=20 but the output did not show the values associated with lag numbers. lag numbers is shown in decimals. What 'lag numbers'? Lags in time series are in time units: most likely

Re: [R] R crashing inconsistently within for loops

2012-12-30 Thread John
On Thu, 27 Dec 2012 22:01:22 -0500 Steve Powers power...@nd.edu wrote: Two points: 1) You don't define crash. Did the script simply hang, did R abruptly cease to run and exit to the OS, did the display freeze, did the OS and machine stop working? Crashing is not explanatory, nor is it

Re: [R] Error in plot.envfit(ef, p.max = 0.1) : (subscript) logical subscript too long

2012-12-30 Thread Gavin Simpson
On Sat, 2012-12-29 at 20:40 +, Laura Martínez Suz wrote: Hello there, I'm trying to plot vectors with p0.1 in a NMDS ordination plot using p.max. Below the scripts I'm using. I guess I'm missing something! could you please give me a hand?

[R] Sheet index (-2147483648) is out of range (0..15)

2012-12-30 Thread eliza botto
Dear useRs, while working in XLConnect, i noticed a strange error Error: IllegalArgumentException (Java): Sheet index (-2147483648) is out of range (0..15) there is not much help available about it online. Can anyone please help? elisa [[alternative

Re: [R] Sheet index (-2147483648) is out of range (0..15)

2012-12-30 Thread Prof Brian Ripley
On 30/12/2012 14:34, eliza botto wrote: Dear useRs, while working in XLConnect, i noticed a strange error Error: IllegalArgumentException (Java): Sheet index (-2147483648) is out of range (0..15) there is not much help available about it online. Can anyone please help? That's the value of

Re: [R] Sheet index (-2147483648) is out of range (0..15)

2012-12-30 Thread eliza botto
thankyou prof. ripley elisa Date: Sun, 30 Dec 2012 14:47:29 + From: rip...@stats.ox.ac.uk To: r-help@r-project.org Subject: Re: [R] Sheet index (-2147483648) is out of range (0..15) On 30/12/2012 14:34, eliza botto wrote: Dear useRs, while working in XLConnect, i noticed a

[R] levelplot

2012-12-30 Thread Janue Miret, Jofre
I have two questions; Do you know how to take out axes in a levelplot? Me doesn't work axes = FALSE And I would like to fix the values range of colorkey or legend from my rainbow col.regions, dou you know how can I fix this values independent of values database? Thanks and happy new year!

[R] Starting with R

2012-12-30 Thread Siddhant Gupta
I have installed R on my machine. Can anyone now suggest to me the best book/e-book from where I can learn the R language most efficiently? Thanks in advance -- Siddhant Gupta III Year Department of Biotechnology IIT Roorkee India [[alternative HTML version deleted]]

[R] How to multiple the vector and variables from dataframe

2012-12-30 Thread meng
hi all: Here's a dataframe(dat) and a vector(z): dat: x1 x2x3 0.2 1.2 2.5 0.5 2 5 0.8 3 6.2 z [1] 10 100 100 I wanna do the following: 10*x1,100*x2,1000*x3 My solution is using the loop for z and dat(since the length of z is the same as ncol of dat),which is

Re: [R] Starting with R

2012-12-30 Thread Bretschneider SIG-R
On 30 Dec 2012, at 12:22 , Siddhant Gupta wrote: I have installed R on my machine. Can anyone now suggest to me the best book/e-book from where I can learn the R language most efficiently? Thanks in advance -- Siddhant Gupta III Year Department of Biotechnology IIT Roorkee India

Re: [R] How to multiple the vector and variables from dataframe

2012-12-30 Thread Neal H. Walfield
At Sun, 30 Dec 2012 18:26:45 +0800 (CST), meng wrote: hi all: Here's a dataframe(dat) and a vector(z): dat: x1 x2x3 0.2 1.2 2.5 0.5 2 5 0.8 3 6.2 z [1] 10 100 100 I wanna do the following: 10*x1,100*x2,1000*x3 My solution is using the loop for

Re: [R] Starting with R

2012-12-30 Thread Jeff Newmiller
Efficiency of learning materials depends on your background and learning style. If you have any background at all in using software, the Introduction to R document that is supplied with R is quite good. There is also a very useful document on getting data in and out of R. There is a list of R

Re: [R] levelplot

2012-12-30 Thread Jeff Newmiller
Please read the Posting Guide mentioned at the bottom of any message on this list (and follow the recommendations there). You may find the suggestions offered here useful: http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

Re: [R] How to multiple the vector and variables from dataframe

2012-12-30 Thread Berend Hasselman
On 30-12-2012, at 11:26, meng laomen...@163.com wrote: hi all: Here's a dataframe(dat) and a vector(z): dat: x1 x2x3 0.2 1.2 2.5 0.5 2 5 0.8 3 6.2 z [1] 10 100 100 I wanna do the following: 10*x1,100*x2,1000*x3 My solution is using the loop for z

Re: [R] How to multiple the vector and variables from dataframe

2012-12-30 Thread Neal H. Walfield
At Sun, 30 Dec 2012 16:28:44 +, Andrius Druzinis wrote: Hi Neal, Notice that c(2, 3) gets replicated into c(2, 3, 2, 3, 2, 3) and then multiplied by column. This is not the same as multiplying each column by the respective element in vector c(2, 3). I think you mean multiplied by

Re: [R] Starting with R

2012-12-30 Thread Einat Granot
https://www.coursera.org/course/stats1 or https://www.coursera.org/course/compdata On Sun, Dec 30, 2012 at 1:22 PM, Siddhant Gupta sid.2311...@gmail.comwrote: I have installed R on my machine. Can anyone now suggest to me the best book/e-book from where I can learn the R language most

Re: [R] Starting with R

2012-12-30 Thread John Kane
It is very dependent on your background and what you are planning to do. Because R is a tool that seems to be used by everyone from linguists to biochemists and everyone has their special interest it is often best to just google for what you are looking for. Here aresome sources that I

Re: [R] levelplot

2012-12-30 Thread Peter Ehlers
On 2012-12-30 06:25, Janue Miret, Jofre wrote: I have two questions; Do you know how to take out axes in a levelplot? Me doesn't work axes = FALSE levelplot() is a lattice function, not base graphics; it has no 'axes' argument. Read about the 'scales' argument in ?xyplot and use

Re: [R] Odds Ratio and Logistic Regression

2012-12-30 Thread Simone Gabbriellini
Took some googling, but it was worth it! :) Best, Simone Sent from my iPhone. Please excuse brevity and odd typos Il giorno 30/dic/2012, alle ore 19:44, Bert Gunter gunter.ber...@gene.com ha scritto: Are you learning the ropes or on the ropes? __

Re: [R] efficiently multiply different matrices in 3-d array with different vectors?

2012-12-30 Thread Suzen, Mehmet
On 29 December 2012 20:35, arun smartpink...@yahoo.com wrote: Is it possible to obtain the same result as X without converting X to R? What do you mean by the same result? There is a relationship between X and R. If you express this relationship algebraically, you can get X directly using Y and

Re: [R] ANOVA repeated measures and post-hoc

2012-12-30 Thread Helios de Rosario
A (late) update to this question: On Fri Aug 17 07:33:29, Henrik Singmann wrote: Hi Diego, I am struggeling with this question also for some time and there does not seem to be an easy and general solution to this problem. At least I haven't found one. However, if you have just one

Re: [R] How to multiple the vector and variables from dataframe

2012-12-30 Thread Andrius Druzinis
Hi Meng, A one-liner would be dat*rep(z, each=nrow(dat)) Cheers, Andrius 2012/12/30 meng laomen...@163.com hi all: Here's a dataframe(dat) and a vector(z): dat: x1 x2x3 0.2 1.2 2.5 0.5 2 5 0.8 3 6.2 z [1] 10 100 100 I wanna do the following:

Re: [R] How to multiple the vector and variables from dataframe

2012-12-30 Thread Andrius Druzinis
Hi Neal, Notice that c(2, 3) gets replicated into c(2, 3, 2, 3, 2, 3) and then multiplied by column. This is not the same as multiplying each column by the respective element in vector c(2, 3). Andrius 2012/12/30 Neal H. Walfield n...@walfield.org At Sun, 30 Dec 2012 18:26:45 +0800 (CST),

Re: [R] How to multiple the vector and variables from dataframe

2012-12-30 Thread arun
HI, Its not clear esp I wanna do the following: 10*x1,100*x2,1000*x3 Did you mean 10* dat[,1], 100*dat[,2], 1000*dat[,3]? dat-read.table(text= x1    x2    x3 0.2  1.2  2.5 0.5  2  5 0.8  3  6.2 ,sep=,header=TRUE) z-c(10,100,1000) # 3rd element in your z is 100, which is confusing.  

Re: [R] help with reshaping wide to long format

2012-12-30 Thread arun
HI Usha, I tried the codes on the full dataset.  This is what I get: BP_2b-read.csv(BP_2b.csv,sep=\t) #head(BP_2b,2) #  CODEA Sex MaternalAge Education Birthplace AggScore IntScore Obese14 #1 1  NA   3 4  1   NA   NA  NA #2 3   2   3 3

[R] code to convert 3D geographical coordinates to Cartesian?

2012-12-30 Thread Tom Roche
Is there packaged code to convert geographical coordinates (e.g., longitude, latitude, elevation) to Cartesian coordinates in 3-space? I can see how to do this using 1. a spherical-to-Cartesian conversion like pracma::sph2cart(tpr) http://cran.r-project.org/web/packages/pracma/ 2. a

Re: [R] How to multiple the vector and variables from dataframe

2012-12-30 Thread meng
Hi Andrius: Thanks for your reply. Your answer: dat*rep(z,each=nrow(dat)) works well. But a strange thing happened: dat-data.frame(x1=1:3,x2=4:6,x3=7:9) z-c(0.1,10,100) #I wanna 0.1*x1,10*x2,100*x3 I type: dat*rep(z,rach=nrow(dat)) rach is each indeed,but I type rach mistakenly. What's strange

Re: [R] How to multiple the vector and variables from dataframe

2012-12-30 Thread meng
Hi Neal, Thanks for your reply. dat-data.frame(x1=1:3,x2=4:6,x3=7:9) z-c(0.1,10,100) #I wanna 0.1*x1,10*x2,100*x3 According to your answer: as.matrix(dat)*z x1x2x3 [1,] 0.1 0.4 0.7 [2,] 20.0 50.0 80.0 [3,] 300.0 600.0 900.0 The above is not what I want. What I want is:

Re: [R] How to multiple the vector and variables from dataframe

2012-12-30 Thread meng
Hi Berend: Thanks for your reply. dat-data.frame(x1=1:3,x2=4:6,x3=7:9) z-c(0.1,10,100) #I wanna 0.1*x1,10*x2,100*x3 Option2 is similar as dat*rep(z,each=length(z)),and the latter is simpler than Option2 in expression. At 2012-12-31 00:31:42,Berend Hasselman b...@xs4all.nl wrote: On

Re: [R] How to multiple the vector and variables from dataframe

2012-12-30 Thread meng
The following is also work: data.frame(t(t(dat)*z)) At 2012-12-31 00:40:24,Neal H. Walfield n...@walfield.org wrote: At Sun, 30 Dec 2012 16:28:44 +, Andrius Druzinis wrote: Hi Neal, Notice that c(2, 3) gets replicated into c(2, 3, 2, 3, 2, 3) and then multiplied by column.

Re: [R] How to multiple the vector and variables from dataframe

2012-12-30 Thread arun
HI Meng, NO problem. #In fact, sweep(dat,2,z,*) #will be data.frame  # x1  x2   x3 #1  2 120 2500 #2  5 200 5000 #3  8 300 6200  str(sweep(dat,2,z,*)) #'data.frame':    3 obs. of  3 variables: # $ x1: num  2 5 8 # $ x2: num  120 200 300 # $ x3: num  2500 5000 6200 A.K.

Re: [R] How to multiple the vector and variables from dataframe

2012-12-30 Thread meng
Hi,arun: Yes,your answer is what I want. A little different is : data.frame(t(t(dat)*z)) Because I wanna get the data frametype, not matrix. Thanks for your reply. At 2012-12-31 00:59:43,arun smartpink...@yahoo.com wrote: HI, Its not clear esp I wanna do the following:

Re: [R] How to multiple the vector and variables from dataframe

2012-12-30 Thread meng
Many thanks arun! Your answer is the best one :) At 2012-12-31 10:51:35,arun smartpink...@yahoo.com wrote: HI Meng, NO problem. #In fact, sweep(dat,2,z,*) #will be data.frame # x1 x2 x3 #1 2 120 2500 #2 5 200 5000 #3 8 300 6200 str(sweep(dat,2,z,*)) #'data.frame':3 obs. of

Re: [R] code to convert 3D geographical coordinates to Cartesian?

2012-12-30 Thread Bert Gunter
Have you checked the spatial stats task view on CRAN? http://cran.r-project.org/web/views/Spatial.html -- Bert On Sun, Dec 30, 2012 at 6:49 PM, Tom Roche tom_ro...@pobox.com wrote: Is there packaged code to convert geographical coordinates (e.g., longitude, latitude, elevation) to Cartesian

Re: [R] code to convert 3D geographical coordinates to Cartesian?

2012-12-30 Thread Tom Roche
https://stat.ethz.ch/pipermail/r-help/2012-December/332658.html Is there packaged code to convert geographical coordinates (e.g., longitude, latitude, elevation) to Cartesian coordinates in 3-space? ... Net: the task seems straightforward enough, but there's certainly scope for error, so I'd

Re: [R] comparison of large data set

2012-12-30 Thread Irucka Embry
Hi Jean, thank-you again. Both the assignment of names and the indices of the successful locations worked perfectly. Irucka Embry -Original Message- From: Adams, Jean [jvad...@usgs.gov] Sent: 12/28/2012 1:28:29 PM To: iruc...@mail2world.com Cc: r-help@r-project.org Subject: Re: [R]