Re: [R] Thinning Lattice Plot

2012-07-31 Thread Deepayan Sarkar
On Tue, Jul 31, 2012 at 2:43 AM, Elliot Joel Bernstein elliot.bernst...@fdopartners.com wrote: Is there an easy way to thin a lattice plot? I often create plots from large data sets, and use the pdf command to save them to a file, but the resulting files can be huge, because every point in the

Re: [R] lattice legen and auto.key conflict

2012-07-31 Thread Deepayan Sarkar
On Mon, Jul 30, 2012 at 10:16 PM, Bert Gunter gunter.ber...@gene.com wrote: David: I think one needs to carefully parse the xyplot help, where it says: To use more than one legend, or to have arbitrary legends not constrained by the structure imposed by key, use the legend argument. So I

Re: [R] why querying Sybase IQ using RODBC returns error ?

2012-07-31 Thread Jadhav, Alok
Thanks Prof Ripley. I found the workaround quickly. I had read the documentation while searching for connection string but did not look for below specific issue. Lesson learnt. Regards, Alok -Original Message- From: Prof Brian Ripley [mailto:rip...@stats.ox.ac.uk] Sent: Monday, July

Re: [R] metafor package, proportions: single groups wrt to a categorical dependent variable

2012-07-31 Thread Dushanthi Pinnaduwage
Thanks very much for the reply Michael.I guess I have to combine some levels to make categorical variable to a binary variable. Dushanthi Date: Sat, 28 Jul 2012 16:38:24 +0100 To: dushan...@bell.net; r-help@r-project.org From: i...@aghmed.fsnet.co.uk Subject: RE: [R] metafor package,

Re: [R] Calculating percentiles for multiple dates

2012-07-31 Thread guzzom
Rui, You made that WAY too easy! Thanks so much, Matt Guzzo On Mon, Jul 30, 2012 at 6:45 PM, Rui Barradas [via R] ml-node+s789695n4638471...@n4.nabble.com wrote: Hello, Sorry for my earlier post, they show the problem of not providing context. Fortunatelly, arun's post made me realize

[R] How can I parse this string to extract just the number 11?

2012-07-31 Thread Shelby McIntyre
Below is the string to parse and return the embedded number = 11 string = \t\t\t\t\tspan class=\compliment-count profile\11/span On Jul 29, 2012, at 3:00 AM, r-help-requ...@r-project.org wrote: char [[alternative HTML version deleted]]

Re: [R] curve comparison

2012-07-31 Thread arun
Hi, Please check this article which details the method for comparison: Statistica Sinica 17(2007), 1115-1137 TESTING FOR THE EQUALITY OF k REGRESSION CURVES Juan Carlos Pardo-Fern ́ndez, Ingrid Van Keilegom and Wenceslao Gonz ́lez-Manteiga Also, check some examples

Re: [R] How can I declare an empty zoo object?

2012-07-31 Thread arun
Hi, When you cbind two zoo objects, I guess the index should match, otherwise it gives warning messages: x1zoo_f-zoo(rnorm(5,25),c(1,5,10,15,9)) xzoo-zoo(c(5,9,10,15),c(1,5,9,10,15)) cbind(xzoo,x1zoo_f)    xzoo  x1zoo_f 1 5 24.85877 5 9 25.09264 9    10 25.79896 10   15 26.70625 15   

Re: [R] Accents and special character using hwriter (on Windows)

2012-07-31 Thread arun
Hello, I tried your code in R 2.15 with Ubuntu 12.04.  It looks okay to me. datosdv-Ciencias Sociales y Jurídicas n:74 | 33.94%  print(datosdv) #[1] Ciencias Sociales y Jurídicas n:74 | 33.94%  library(hwriter)  p=openPage('test.html')  hwrite(datosdv,p,br=TRUE) #test.html output Ciencias

Re: [R] R-neuralnet code

2012-07-31 Thread arun
Hello Rahul, I can see comments for each line of the code which is not very hard to understand. From your earlier post, I think you were having some problems with the compute method.  Check this link

Re: [R] mgcv 1.7-19, vis.gam(): invalid 'z' limits'

2012-07-31 Thread janvanhove
Hi Simon, Thanks for your reply. m - bam(Correct ~ cEnglishTotal + te(WSTResid, RavenResid) + s(Stimulus, bs=re) + s(Subject, bs=re), data = dat, family = binomial) # cEnglishTotal, WSTResid and RavenResid are continuous variables; Correct, Stimulus and Subject are factors. vis.gam(m,

[R] Ubuntu installation

2012-07-31 Thread Gene Leynes
I just followed the instructions on CRANhttp://cran.r-project.org/bin/linux/ubuntu/README to install R on an Ubuntu instance. sudo apt-get install r-base Why does it install an old version of R? Can I install version 15.1? I changed my sources.list to be a current cran mirror. I believe that I

Re: [R] Ubuntu installation

2012-07-31 Thread Gene Leynes
I got R to update to the latest version The problem was the sources.list file. I had not fixed the sources.list file correctly, which was apparent when I opened the file using sudo nano sources.list Opening the file from the command line turns on syntax highlighting (as opposed to opening a file

Re: [R] R- Help (looping)

2012-07-31 Thread Rui Barradas
Hello, Inline Em 31-07-2012 02:59, Wellington Silva escreveu: Ok, This really helped. You've probably noticed, I'm a begginer using R. And when you said that you tried with rnorm and the counts were not zero, where did you use the rnorm? Where the runif is, in its stead use matrix(

Re: [R] How can I parse this string to extract just the number 11?

2012-07-31 Thread Rui Barradas
Hello, Try the following. string - \t\t\t\t\tspan class=\compliment-count profile\11/span gsub([^[:digit:]], , string) Then use as.numeric or as.integer. Hope this helps, Rui Barradas Em 31-07-2012 01:19, Shelby McIntyre escreveu: Below is the string to parse and return the embedded number

Re: [R] How can I declare an empty zoo object?

2012-07-31 Thread jpm miao
Hi Michael, 1. I try this xzoo - zoo() and it does work. OK, I will read the reference you provide to find out why not to do so 2. How can I create an array of zoo objects? 3. Do you mean by R's wisest virgil Pat Burns' R Inferno? To Arun: Even when indices

[R] Remove a complete row as per the Range in a Matrix

2012-07-31 Thread Rantony
Hi, Here i have a Matrix MyMatrix - NameAge - --- ANTONY27 IMRAN 30 RAJ 22 NAHAS 32 GEO 42 and here i have an array with Minimum and Maximum values. MinMaxArray - data.frame(MIN = 25,MAX=35) MIN

Re: [R] Zoo panel function

2012-07-31 Thread Achim Zeileis
On Sun, 29 Jul 2012, Gene Leynes wrote: I would really like some help with understanding the panel function, in zoo. Thank you. Have you looked at ?plot.zoo. Some of the features you ask about are explained there. In particular, it is explained that arguments like col, lty, etc. are

Re: [R] cannot install RSTAR, MSVAR, and MSVECM packages

2012-07-31 Thread peter dalgaard
On Jul 31, 2012, at 02:50 , Ario Ario wrote: Hi, Thank you. I've tried to find the substitute of such packages with google, but I couldn't find any. Could you please tell me how to find it? Sorry, I'm a beginner user of this software. First explain what you want to do and where you got

Re: [R] Remove a complete row as per the Range in a Matrix

2012-07-31 Thread Rui Barradas
Hello, Please learn how to use dput(), it's not your first post. And try the following. myMatrix - data.matrix(read.table(text= NameAge ANTONY27 IMRAN 30 RAJ 22 NAHAS 32 GEO 42 , header=TRUE)) MinMaxArray -

[R] Significance of correlation

2012-07-31 Thread Chintanu
Hi, I understand that to test the significance of correlation between two PAIRED variables, the function, cor.test () can be used. However, in my case, I have tested the correlation (i.e., Correlation Coefficient, r) between two independent (i.e, different) variables, and now I wish to test for

Re: [R] barplot question

2012-07-31 Thread Rui Barradas
Hello, Ok, final retouches. 1. Divide the par() call: oldpar - par(mar=c(9, 4.1, 4.1, 2.1)) oldfont - par(font=3) Then, just before legend() par(oldfont) # back to normal font 2. Modify the text() call to text(as.vector(bp), y = -6.5, cex=0.7, pos = 2, offset = -0.25,

Re: [R] Significance of correlation

2012-07-31 Thread S Ellison
If you have pearson correlation coefficients r calculated from n data points elsewhere, you can use a t test on t.r - r * sqrt( (n-2)/(1-r^2) ) You'll need to use pt() to get your p value from t.r, though. S Ellison I understand that to test the

Re: [R] Significance of correlation

2012-07-31 Thread Rolf Turner
On 31/07/12 21:13, Chintanu wrote: Hi, I understand that to test the significance of correlation between two PAIRED variables, the function, cor.test () can be used. However, in my case, I have tested the correlation (i.e., Correlation Coefficient, r) between two independent (i.e, different)

Re: [R] replace values in vector from a replacement table

2012-07-31 Thread Liviu Andronic
On Mon, Jul 30, 2012 at 6:00 PM, jim holtman jholt...@gmail.com wrote: try this: (x - rep(letters,2)) [1] a b c d e f g h i j k l m n o p q r s t u v w [24] x y z a b c d e f g h i j k l m n o p q r s t [47] u v w x y z values - c(aa, a, b, NA, d, zz) repl - c(aa, A, B, NA, D, zz)

Re: [R] length of variable in mlogit

2012-07-31 Thread Ingmar Visser
hard to judge what the problem is without an example and without the actual error message that mlogit (which one? there are several functions with that name in various packages) gives you. best, Ingmar On Mon, Jul 30, 2012 at 11:30 AM, Lee van Cleef l.van.cl...@gmx.net wrote: Dear all, does

Re: [R] labeling loading vectors in vegan

2012-07-31 Thread Gavin Simpson
On Fri, 2012-07-27 at 11:52 -0700, Gordon Holtgrieve wrote: Hello, I am using vegan to do an NMDS plot and I would like to suppress the labels for the loading vectors. Is this possible? Alternatively, how can I avoid overlap? Hi Gordon, You seem to be trying to fit the species scores as a

[R] TimeStamps to seconds

2012-07-31 Thread Alaios
Dear all, I am having a matrix that stores data information in the following format. roofPart1$TimeStamps[1:5,] [,1] [,2] [,3] [,4] [,5]   [,6] [1,] 2011    7   21   15   25 20.609 [2,] 2011    7   21   15   25 23.265 [3,] 2011    7   21   15   25 26.000 [4,] 2011    7   21   15   25 28.671

Re: [R] Thinning Lattice Plot

2012-07-31 Thread Elliot Joel Bernstein
Thanks everyone for your replies. I didn't know about the ecdfplot function, so I'll start using that instead of Ecdf. Why is Ecdf not a lattice plot? The result certainly looks like other lattice plots, the arguments are similar to other lattice plots. In fact, internally it seems to just call

Re: [R] Latest version of R on Ubuntu

2012-07-31 Thread peter dalgaard
On Jul 31, 2012, at 02:58 , Jeff Newmiller wrote: Amazingly, RTFM. RTFWP, I think you mean. Sounds like you are referring to this one: http://cran.r-project.org/bin/linux/ubuntu/ Linux typically uses repositories to download software from. If you follow the instructions on CRAN specific

Re: [R] TimeStamps to seconds

2012-07-31 Thread Rui Barradas
Hello, Try the following. mat - data.matrix(read.table(text= 20117 21 15 25 20.609 20117 21 15 25 23.265 20117 21 15 25 26.000 20117 21 15 25 28.671 20117 21 15 25 31.343)) secs - apply(mat, 1, function(x) ISOdatetime(x[1], x[2], x[3],

Re: [R] Thinning Lattice Plot

2012-07-31 Thread Bert Gunter
Well, yes. Terminology-wise, I guess one could say that it's a trellis plot in the Hmisc package. But I'd agree that this is nitpicking. -- Bert On Tue, Jul 31, 2012 at 6:13 AM, Elliot Joel Bernstein elliot.bernst...@fdopartners.com wrote: Thanks everyone for your replies. I didn't know about

Re: [R] Ubuntu installation

2012-07-31 Thread Jeff Newmiller
a) There are various routes to modifying sources.list... Ubuntu Software Center has a dialog box for it, and there are several other such tools. b) I always copy-pasted from the instructions so I had no problems with fiddly bits. c) Not all mirrors are created equal... sometimes you need to

Re: [R] R- Help (looping)

2012-07-31 Thread Rui Barradas
Hello, Glad it helped. E fico à espera do relatório. Rui Barradas Em 31-07-2012 14:40, Wellington Silva escreveu: Rui, This is a cientific initiation program. The idea is to develop a code which can simulate data and calculate the ARL later. *So, a little bit later yesterday night, after

[R] Classification with GBM and imbalanced class sizes

2012-07-31 Thread Yohann R
Hi all I'm dealing with a supervised binary classification issue. I'd like to use the GBM package to classify individuals as uninfected/infected. I have 15 times more uninfected than infected individuals. I was wondering if GBM models suffer in the case of imbalanced class sizes? I didn't find

[R] ways of getting around allocMatrix limit?

2012-07-31 Thread David Romano
I need to multiply to very large, nonsparse matrices, and so get the error allocMatrix: too many elements specified. Is there a way to set the limit for allocMatrix? In my case, the two matrices, A and B, are nxm and mxp where m is small, so I could subdivide each into blocks of submatrices

Re: [R] How can I declare an empty zoo object?

2012-07-31 Thread R. Michael Weylandt
On Tue, Jul 31, 2012 at 2:40 AM, jpm miao miao...@gmail.com wrote: Hi Michael, 1. I try this xzoo - zoo() and it does work. OK, I will read the reference you provide to find out why not to do so 2. How can I create an array of zoo objects? I'm not quite sure what

[R] kernlab kpca predict

2012-07-31 Thread Jessica Streicher
Hi! The kernlab function kpca() mentions that new observations can be transformed by using predict. Theres also an example in the documentation, but as you can see i am getting an error there (As i do with my own data). I'm not sure whats wrong at the moment. I haven't any predict functions

Re: [R] kernlab kpca predict

2012-07-31 Thread Jessica Streicher
Hm.. seems like its a problem with loading it in the profile.. If i load it again in the console it works fine. Must have something to do with the masking. -- Changed load-order with the package which required stats that did the masking, and it works now, so, nevermind. On

[R] Error Installing Package with Dependency on Matrix

2012-07-31 Thread Elliot Joel Bernstein
I'm attempting to update to R 2.15.1, and I'm having trouble with a package that depends on the Matrix package. I've created a dummy package consisting only of a DESCRIPTION file that specifies the dependence on Matrix, a NAMESPACE file, and an R directory, containing a single function, square -

Re: [R] On Reproducible Code

2012-07-31 Thread Bart Joosen
How about sending an email to the OP with a message like: Hi, Thanks for submitting a question to the R-help list. We hope you did read the Posting Guide and submitted a reproducible example of your code (by the use of dput, structure, ...). Then there is no need to add the message to the end

[R] Arrangement of names

2012-07-31 Thread Michael Eisenring
Dear R-help members I would be grateful if anyone could help me with the following problem: 1: I changed the font style of the plant names (along x-axis, under the bars) to italic . How can I avoid that the font in the legend also changes to italic? 2. I would like to place the plant names

[R] Spatial regression

2012-07-31 Thread DanielFV
Dear list members, I have a large dataset with point data. Each data point has X, Y, number of species present and values for one single explanatory variable. Each point was generated from a polygon grid shapefile and they are at equal distances. I conducted GLS analyses introducing variance

Re: [R] How can I parse this string to extract just the number 11?

2012-07-31 Thread arun
Hello, Try this:  string = \t\t\t\t\tspan class=\compliment-count profile\11/span  gsub(.*(11).*,\\1,string) #[1] 11 A.K. - Original Message - From: Shelby McIntyre smcint...@scu.edu To: r-help@r-project.org Cc: Sent: Monday, July 30, 2012 8:19 PM Subject: [R] How can I parse this

Re: [R] Accents and special character using hwriter (on Windows)

2012-07-31 Thread ramonovelar
Thanks Arun, Yes, I have Windows 7. I have tried 2 versions of R, 2.14.1 and 2.15.x, but it did not change anything. Right now I can't try a different version of win. Ramón On Tuesday, July 31, 2012, arun kirshna [via R] wrote: Hello, I tried your code in R 2.15 with Ubuntu 12.04. It looks

Re: [R] How can I declare an empty zoo object?

2012-07-31 Thread arun
Hi, #Without indices  xzoo-zoo()  x1zoo_f-zoo(1:10,)  cbind(xzoo,x1zoo_f)    x1zoo_f 1    1 2    2 3    3 4    4 5    5 6    6 7    7 8    8 9    9 10  10 #With indices on one x1zoo_f-zoo(1:5,1:10) cbind(xzoo,x1zoo_f)    x1zoo_f 1    1 2    2 3  

Re: [R] Remove a complete row as per the Range in a Matrix

2012-07-31 Thread arun
Hi, Try this: myMatrix-read.table(text= Name    Age ANTONY    27 IMRAN  30 RAJ  22 NAHAS  32 GEO    42 ,sep=,header=TRUE) MinMaxArray  - data.frame(MIN = 25,MAX=35) myMatrix[myMatrix$Age=MinMaxArray$MAX myMatrix$Age=MinMaxArray$MIN,]   # 

[R] Frailty variable and cluster function in coxph

2012-07-31 Thread BrittD
I have a dataset with the variables: idstart stop event tempdiff straling The data contains recurrent event, so for each id more than one interval is created and more than one event can occur. I have fitted the next model: mod1 = coxph(Surv(start,stop,event) ~ tempdiff3 +

[R] Univariate Time Series Analysis in R

2012-07-31 Thread override
Hello! I want to realise an univariate time series analysis in R, can someone help me for the first steps? Thanks -- View this message in context: http://r.789695.n4.nabble.com/Univariate-Time-Series-Analysis-in-R-tp4638538.html Sent from the R help mailing list archive at Nabble.com.

[R] par(mfrow) or split.screen with climatol roseavent plot?

2012-07-31 Thread Jan Näs
Hi I trying to add a wind rose as a plot together with other plots. Im unsing the roseavent function from the climatol package. Ive tried par(mfrow=c(2,2)) but when plotting the windrose: rosavent(windfreq_rose,4,3,ang=-3*pi/16,main=Windrose) it skips one position, and when plotting the next one

[R] Creation of a vector of time series from a data frame

2012-07-31 Thread monthodon
Hello, I am a new user of R. I am trying to create a vector of time series called LTot from a data frame. The purpose is to call LTot element from a loop to make multiple regressions over a large number of regressors. Here a piece of R code OGData - read.table(heartatk4R.txt, header=TRUE) OGCol

[R] year extraction over a list

2012-07-31 Thread jimi adams
Hello, I have a data frame, one element in that data frame is a LIST, with each element being a character string. I am trying to extract the first year listed in each of those character strings. The character elements are typically csv, but the position of the year can vary (think citations

Re: [R] Error Installing Package with Dependency on Matrix

2012-07-31 Thread Elliot Joel Bernstein
A follow up on this issue...if I first build the package using R CMD build temp, I can install the resulting .tar.gz file from within R using the install.packages command, but I still can't install it from the command line using R CMD INSTALL. - Elliot On Tue, Jul 31, 2012 at 11:33 AM, Elliot

[R] Logistic regression X^2 test with large sample size (fwd)

2012-07-31 Thread M Pomati
Does anyone know of any X^2 tests to compare the fit of logistic models which factor out the sample size? I'm dealing with a very large sample and I fear the significant X^2 test I get when adding a variable to the model is simply a result of the sample size (200,000 cases). I'd rather use

Re: [R] ways of getting around allocMatrix limit?

2012-07-31 Thread Prof Brian Ripley
On 31/07/2012 15:10, David Romano wrote: I need to multiply to very large, nonsparse matrices, and so get the error allocMatrix: too many elements specified. Is there a way to set the limit for allocMatrix? No: see ?'Memory-limits'. There are also limits on individual objects. On all

Re: [R] Univariate Time Series Analysis in R

2012-07-31 Thread Roy Mendelssohn
On Jul 31, 2012, at 7:13 AM, override wrote: Hello! I want to realise an univariate time series analysis in R, can someone help me for the first steps? Thanks http://cran.r-project.org/web/views/TimeSeries.html ** The contents of this message do not reflect any

Re: [R] curve comparison

2012-07-31 Thread David Winsemius
On Jul 30, 2012, at 8:48 PM, arun wrote: Hi, Please check this article which details the method for comparison: Statistica Sinica 17(2007), 1115-1137 TESTING FOR THE EQUALITY OF k REGRESSION CURVES Juan Carlos Pardo-Fern ́ndez, Ingrid Van Keilegom and Wenceslao Gonz ́lez-Manteiga Also,

Re: [R] year extraction over a list

2012-07-31 Thread Rui Barradas
Hello, Try the following. x - c(text, text, 2001, text, text, 2000, text, 1999, text, text, text) extract.year - function(x, n = 4){ pattern - paste(.*([[:digit:]]{, n, }).*, sep=) as.integer(sub(pattern, \\1, x)) } extract.year(x) The argument 'n' is the number of digits of year.

Re: [R] Univariate Time Series Analysis in R

2012-07-31 Thread J Toll
On Tue, Jul 31, 2012 at 9:13 AM, override hugos...@gmail.com wrote: I want to realise an univariate time series analysis in R, can someone help me for the first steps? There's a lot of material on this subject if you just do a basic search of Google or rseek.org. As already mentioned, the CRAN

Re: [R] Spatial regression

2012-07-31 Thread Ben Bolker
DanielFV kalandru at hotmail.com writes: [snip] I conducted GLS analyses introducing variance structures and correlation structures to improve the model. I plotted variograms before and after adding the correlation structures but I would like to be able to conduct a test that gives me

[R] points

2012-07-31 Thread B787s
Dear R-Help, I am using 'rms' package to draw nomogram. I wonder how is the Points determined for each predictor in the model? Is it by the coefficient estimate (beta) relative to the highest effect in the model or? Thanks Lin -- View this message in context:

[R] Problems in using GMM for calculating linear regression

2012-07-31 Thread deshesoft
Hi, I'm trying to use gmm package in order to calculate linear regression (I need to use the gmm for other application and this is a prior test I'm doing). I've defined a function for linear regression with 2 variables (x[,1] holds the y values, while x[,2:3] holds the x values): function(tet,

Re: [R] Remove a complete row as per the Range in a Matrix

2012-07-31 Thread David Winsemius
On Jul 31, 2012, at 1:31 AM, Rui Barradas wrote: Hello, Please learn how to use dput(), it's not your first post. And try the following. myMatrix - data.matrix(read.table(text= I think the data.matrix transformation is a bad idea. It forces the numeric values to be character and the

Re: [R] metafor package, proportions: single groups wrt to a categorical dependent variable

2012-07-31 Thread Michael Dewey
At 01:18 31/07/2012, Dushanthi Pinnaduwage wrote: Thanks very much for the reply Michael. I guess I have to combine some levels to make categorical variable to a binary variable. Without knowing more about your outcome variable (you have not even told us yet whether it is ordered or not)

Re: [R] Thinning Lattice Plot

2012-07-31 Thread Deepayan Sarkar
On Tue, Jul 31, 2012 at 6:43 PM, Elliot Joel Bernstein elliot.bernst...@fdopartners.com wrote: Thanks everyone for your replies. I didn't know about the ecdfplot function, so I'll start using that instead of Ecdf. Why is Ecdf not a lattice plot? The result certainly looks like other lattice

Re: [R] Logistic regression X^2 test with large sample size (fwd)

2012-07-31 Thread Marc Schwartz
On Jul 31, 2012, at 10:35 AM, M Pomati marco.pom...@bristol.ac.uk wrote: Does anyone know of any X^2 tests to compare the fit of logistic models which factor out the sample size? I'm dealing with a very large sample and I fear the significant X^2 test I get when adding a variable to the

[R] time series line plot: Error in plot.window(...) : invalid 'xlim' value

2012-07-31 Thread Yolande Tra
Hello, This should be pretty simple but I cannot get it right. Please point to the right code. Thanks. last - read.csv(file.path(dataDir,plot1.csv), as.is=T,stringsAsFactors = FALSE) last dater_wvht 18/6/2008 0.977 28/8/2008 0.773 3 8/11/2008 1.483 4

Re: [R] time series line plot: Error in plot.window(...) : invalid 'xlim' value

2012-07-31 Thread Rui Barradas
Hello, You could use dput(), it's not your first post... last - structure(list(date = c(8/6/2008, 8/8/2008, 8/11/2008, 8/13/2008, 8/14/2008, 8/18/2008, 8/20/2008, 8/27/2008, 8/28/2008, 8/31/2008, 9/2/2008, 9/3/2008, 9/4/2008, 9/5/2008, 9/8/2008, 9/11/2008, 10/12/2009, 10/14/2009, 10/19/2009,

Re: [R] time series line plot: Error in plot.window(...) : invalid 'xlim' value

2012-07-31 Thread R. Michael Weylandt
On Tue, Jul 31, 2012 at 12:02 PM, Yolande Tra yolande@gmail.com wrote: Hello, This should be pretty simple but I cannot get it right. Please point to the right code. Thanks. last - read.csv(file.path(dataDir,plot1.csv), as.is=T,stringsAsFactors = FALSE) last dater_wvht 1

Re: [R] time series line plot: Error in plot.window(...) : invalid 'xlim' value

2012-07-31 Thread Rui Barradas
Hello, Sorry, I forgot the time series part of your question. You could use instead one of # 1. type = l gives a line plot plot(r_wvht ~ date, data = last, type=l) # 2. use time series object plot library(zoo) z - zoo(last$r_wvht, order.by=last$date) plot(z) Rui Barradas Em 31-07-2012

Re: [R] Creation of a vector of time series from a data frame

2012-07-31 Thread R. Michael Weylandt
Err... some fundamental problems here. On Tue, Jul 31, 2012 at 9:57 AM, monthodon fousserea...@hotmail.com wrote: Hello, I am a new user of R. I am trying to create a vector of time series called LTot from a data frame. The purpose is to call LTot element from a loop to make multiple

Re: [R] time series line plot: Error in plot.window(...) : invalid 'xlim' value

2012-07-31 Thread Rui Barradas
Hello, It only gives that error if you don't last$date - as.Date(last$date, format=%m/%d/%Y) You must have dates, not character values. Try it, then make a zoo object, then plot it. Rui Barradas Em 31-07-2012 18:54, Yolande Tra escreveu: Thank you everyone for the attempt to solve the

Re: [R] Logistic regression X^2 test with large sample size (fwd)

2012-07-31 Thread M Pomati
Marc, thank you very much for your help. I've posted in on http://math.stackexchange.com/questions/177252/x2-tests-to-compare-the-fit-of-large-samples-logistic-models and added details. Many thanks Marco --On 31 July 2012 11:50 -0500 Marc Schwartz marc_schwa...@me.com wrote: On Jul 31,

Re: [R] year extraction over a list

2012-07-31 Thread arun
Hello, Try this: list1-list( text, text, 2001, text, text, 2000, text,  1999, text, text, text) l1-lapply(list1,function(x) gsub(\\D,,x)) [[1]] [1] 2001 [[2]] [1] 2000 [[3]] [1] 1999 unlist(l1) [1] 2001 2000 1999 A.K. - Original Message - From: jimi adams

Re: [R] time series line plot: Error in plot.window(...) : invalid 'xlim' value

2012-07-31 Thread Yolande Tra
Thank you everyone for the attempt to solve the problem It is an irregular series and insert NAs when a date is missing library(zoo) z - zoo(last$r_wvht, order.by=last$date) plot(z) Error in plot.window(...) : need finite 'xlim' values In addition: Warning messages: 1: In xy.coords(x, y,

Re: [R] time series line plot: Error in plot.window(...) : invalid 'xlim' value

2012-07-31 Thread Yolande Tra
Thanks. This is an irregular time series. The line plot does not look good because of the gap between 9/11/2008 and 10/12/2009. I think two plots would be better. How would you include the date on the x-axis. Right now it only gives one tick mark, 2009. Yolande On Tue, Jul 31, 2012 at 2:01 PM,

[R] Question regarding behaviour of package {plspm}

2012-07-31 Thread Arne Erpenbach
Hello everyone, the sources of package{plspm} give me some headaches. rounding: Firstly, rounding is used on different occasions where I would not suspect it. For an example, please have a look at the sources of plsreg1{plspm}. I wonder why to perform rounding within the function, and not when

Re: [R] Thinning Lattice Plot

2012-07-31 Thread Elliot Joel Bernstein
I see. I typically use a (one-sided) formula as the first argument to Ecdf, but didn't even think about that distinction in putting together this example. Thanks again for your help. - Elliot On Tue, Jul 31, 2012 at 12:46 PM, Deepayan Sarkar deepayan.sar...@gmail.com wrote: On Tue, Jul 31,

[R] drawing a specific plane with scatterplot3d

2012-07-31 Thread Andras Farkas
Dear All,   using the example from the package scatterplot3d I created a 3d plot as follows:   x -rnorm(500,50,2) y -rnorm(500,5,1) z -rnorm(500,6,1) scatterplot3d(x, y, z, highlight.3d=TRUE, col.axis=blue,col.grid=lightblue, main=scatterplot3d - 1, pch=20)   I would like to ask if anyone could

Re: [R] year extraction over a list

2012-07-31 Thread Rui Barradas
Hello, Ok, try this, then. (I've renamed the function and included some numbers in the text strings.) x - c(text, text, 2001, text, 1234, text, 2000, 1234, text, 1999, text, 1234, text, text) extract.first.year - function(x, n = 4){ pattern - paste(\\D*(\\d{, n, }).*$, sep=)

[R] Subgraph isomorphism using vertex labels

2012-07-31 Thread HIMANSHU MITTAL
Hi all, I want to find all the mappings of one graph in another graph, based on their vertex labels Is there any way to do this in igraph based on vertex labels. (as far as i know Igraph allows the subgraph isomorphism based only on vertex and edge colors) Eg: graph 1: x(1) x(2) x(2) y(3) y(4)

Re: [R] drawing a specific plane with scatterplot3d

2012-07-31 Thread Duncan Murdoch
On 12-07-31 2:54 PM, Andras Farkas wrote: Dear All, using the example from the package scatterplot3d I created a 3d plot as follows: x -rnorm(500,50,2) y -rnorm(500,5,1) z -rnorm(500,6,1) scatterplot3d(x, y, z, highlight.3d=TRUE, col.axis=blue,col.grid=lightblue, main=scatterplot3d - 1,

Re: [R] time series line plot: Error in plot.window(...) : invalid 'xlim' value

2012-07-31 Thread Rui Barradas
Hello, Adapted from the help page for plot.zoo #library(zoo) #z - zoo(last$r_wvht, order.by=last$date) plot(z, xaxt = n) tt - time(z) ix - seq(1, length(tt), length.out=8) axis(side = 1, at = tt[ix], labels = FALSE) labs - format(tt, %Y-%b-%d) axis(side = 1, at = tt[ix], labels = labs[ix], tcl

Re: [R] Logistic regression X^2 test with large sample size (fwd)

2012-07-31 Thread David Winsemius
On Jul 31, 2012, at 10:25 AM, M Pomati wrote: Marc, thank you very much for your help. I've posted in on http://math.stackexchange.com/questions/177252/x2-tests-to-compare-the-fit-of-large-samples-logistic-models and added details. I think you might have gotten a more statistically

Re: [R] Creation of a vector of time series from a data frame

2012-07-31 Thread William Dunlap
See in-line comments below. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of monthodon Sent: Tuesday, July 31, 2012 7:57 AM To: r-help@r-project.org Subject: [R]

Re: [R] lattice legen and auto.key conflict

2012-07-31 Thread Peter Ehlers
On 2012-07-30 23:55, Deepayan Sarkar wrote: (I wish that reading lattice help would be less like trying to follow an Asimov robot story, but there are too many possible interactions to document both comprehensively and accurately.) I, Robot, having assessed said lattice help, determine it to

Re: [R] par(mfrow) or split.screen with climatol roseavent plot?

2012-07-31 Thread David Winsemius
On Jul 31, 2012, at 7:21 AM, Jan Näs wrote: Hi I trying to add a wind rose as a plot together with other plots. Im unsing the roseavent function from the climatol package. Ive tried par(mfrow=c(2,2)) but when plotting the windrose: rosavent(windfreq_rose,4,3,ang=-3*pi/16,main=Windrose) it

Re: [R] How can I declare an empty zoo object?

2012-07-31 Thread Gabor Grothendieck
On Tue, Jul 31, 2012 at 8:23 AM, arun smartpink...@yahoo.com wrote: Hi, #Without indices xzoo-zoo() x1zoo_f-zoo(1:10,) cbind(xzoo,x1zoo_f) x1zoo_f 11 22 33 44 55 66 77 88 99 10 10 #With indices

[R] protential rounding error concern

2012-07-31 Thread Jie
Dear All, I am running a r code on 32bit win, involving absolutely small numbers. Although I tried sth like the ratio of numers like 10^(-100) and did not have issue to get the correct answer, but still a little concerned about it. Could anyone give some suggestion or have any experience? Best

Re: [R] protential rounding error concern

2012-07-31 Thread R. Michael Weylandt
On Tue, Jul 31, 2012 at 2:45 PM, Jie jimmycl...@gmail.com wrote: Dear All, I am running a r code on 32bit win, involving absolutely small numbers. Although I tried sth like the ratio of numers like 10^(-100) and did not have issue to get the correct answer, but still a little concerned about

Re: [R] protential rounding error concern

2012-07-31 Thread Petr Savicky
On Tue, Jul 31, 2012 at 03:45:14PM -0400, Jie wrote: Dear All, I am running a r code on 32bit win, involving absolutely small numbers. Although I tried sth like the ratio of numers like 10^(-100) and did not have issue to get the correct answer, but still a little concerned about it. Could

[R] about lscv

2012-07-31 Thread chester123
Thanks in advance. Nowadays I just calculate the bandwidth h of cross validation in kernel smoothing using R language. And I just looked up the usage of function, which is lscv(x,.., exact=FALSE) My question is what does stand for and mean? do you mind specifically explaining it

[R] Mediation analysis

2012-07-31 Thread jawortman
Hello all, I apologize for the simplistic question, but I have been having some trouble learning how to do mediation analysis in R. Ideally, I would like to use Preacher's Bootstrapping test for mediation (Preacher Hayes, 2004). I have attempted to use the mediate package to set this up, using

[R] Help on VGAM package(missing value where TRUE/FALSE needed )

2012-07-31 Thread chamilka
I am using VGAM R package for my research works. In my study, I am trying to simulate 1000 datasets from Beta binomial distribution for a given set of (n,prob,size,rho) and then I need to estimate the parameters prob and rho of the simulated 1000 datasets and need to store the fitted

Re: [R] time series line plot: Error in plot.window(...) : invalid 'xlim' value

2012-07-31 Thread Yolande Tra
It does look better indeed. Thanks, Yolande On Tue, Jul 31, 2012 at 3:15 PM, Rui Barradas ruipbarra...@sapo.pt wrote: Hello, Adapted from the help page for plot.zoo #library(zoo) #z - zoo(last$r_wvht, order.by=last$date) plot(z, xaxt = n) tt - time(z) ix - seq(1, length(tt),

[R] changing family distribution, but not as a part of a glm or regression model

2012-07-31 Thread kkarr
Hi, Thanks for reading and any suggestions. I am slowly teaching myself R. I am currently modeling critical thresholds or breakpoints/switchpoints in ecological systems. I have using the strucchange package, but tweaking it for my questions at hand. What I am trying to figure out is how to

Re: [R] about lscv

2012-07-31 Thread Bert Gunter
I should add that it's also explained in more technical detail in 4.1.2 and 4.3 of the R Language Manual. -- Bert On Tue, Jul 31, 2012 at 1:08 PM, chester123 chester...@live.cn wrote: Thanks in advance. Nowadays I just calculate the bandwidth h of cross validation in kernel smoothing using R

Re: [R] about lscv

2012-07-31 Thread Sarah Goslee
Hi, On Tue, Jul 31, 2012 at 4:08 PM, chester123 chester...@live.cn wrote: Thanks in advance. Nowadays I just calculate the bandwidth h of cross validation in kernel smoothing using R language. And I just looked up the usage of function, which is lscv(x,.., exact=FALSE) Do you mean

[R] Help with NaN when 0 divided by 0

2012-07-31 Thread Jennifer Sabatier
Hi All, I have some data where I am doing fairly simple calculations, nothing more than adding, subtracting, multiplying and dividing. I’m running into a problem when I divide one variable by another and when they’re both 0 I get NaN. I realize that if you divide a non-zero by 0 then you get

Re: [R] about lscv

2012-07-31 Thread R. Michael Weylandt
Forgot to cc the archives, M On Tue, Jul 31, 2012 at 3:27 PM, R. Michael Weylandt michael.weyla...@gmail.com wrote: Well, there aren't quite so many dots -- only 3 I'd imagine. It's how R allows variadic functions -- that is, allows extra arguments that don't correspond to named formal

  1   2   >