Re: [R] Daily Time series setting

2013-08-28 Thread Sudheer Joseph
Thank you it works, With best regards Sudheer On Wednesday, August 28, 2013, Pascal Oettli wrote: > Hello, > > Use "zoo" instead. > > Regards, > Pascal > > > 2013/8/28 Sudheer Joseph 'sjo.in...@gmail.com');>> > >> Also, if that was the case, in below specification it should take the >> timeserie

Re: [R] mcapply not using more than 1 core

2013-08-28 Thread joe meiring
So am I crazy or does read.csv block concurrent operations? On Wed, Aug 28, 2013 at 11:28 AM, joe meiring wrote: > Yeah it seems like read.csv is blocking concurrent reads, can anyone > verify if that is true? If so, is there a better way to read in csv files > into a data frame? > > > On Wed, A

Re: [R] Plotting time vs number

2013-08-28 Thread mohan . radhakrishnan
Hi, plot(strptime(data$Time,"%H:%M:%S"),data$Kbytes,pch=0,type="b",col = "red", col.axis="red", ylab="", xlab="",las=2,lwd=2.5,cex.axis=1.5) title("",cex.main=3,xlab="Seconds", line=5.2,ylab="Kbytes", cex.lab=2,1) Hope I am not simplifying this in a bad way. These lines plot everything properl

[R] Can not install rCharts

2013-08-28 Thread Christofer Bogaso
Hello again, I was trying to install the rCharts package using following rule, however I am getting error while doing that > require(devtools) Loading required package: devtools WARNING: Rtools is required to build R packages, but no version of Rtools compatible with R 3.0.1 was found. (Only the

Re: [R] scale breaks

2013-08-28 Thread Jim Lemon
On 08/29/2013 02:52 AM, Shane Carey wrote: Hi, Has anyone ever created scale breaks in R something like what is shown here in the section, Use a Scale Break http://www.r-bloggers.com/graphing-highly-skewed-data/ Thanks Hi Shane, As Sarah answered, axis.break in the plotrix package is a start

Re: [R] error installing ggm package

2013-08-28 Thread Lianne Schroeder
Thanks for all the help! I was able to get all the packages to run now. On Wed, Aug 28, 2013 at 6:25 AM, Ista Zahn wrote: > On Tue, Aug 27, 2013 at 8:07 PM, Pascal Oettli wrote: > > Hello, > > > > "graph" is a Bioconductor package. > > you can install it from > http://www.bioconductor.org/pack

Re: [R] Problem with "Peaks" package

2013-08-28 Thread Pascal Oettli
Hello, In the absence of a commented, minimal, self-contained, reproducible code (as kindly requested), it is hard to help you. Regards, Pascal 2013/8/29 Wildgruber, Christoph U. > Hi, > > I started evaluating the 'Peaks' package a couple of months ago and found > it to be quite > useful. Get

Re: [R] why is this a factor?

2013-08-28 Thread Ista Zahn
On Wed, Aug 28, 2013 at 7:44 PM, Steve Lianoglou wrote: > Hi, > > On Wed, Aug 28, 2013 at 3:58 PM, Ista Zahn wrote: >> Or go all the way and put >> >> options(stringsAsFactors = FALSE) >> >> at the top your script or in your .Rprofile. This will prevent this >> kind of annoyance in the future wit

Re: [R] why is this a factor?

2013-08-28 Thread Steve Lianoglou
Hi, On Wed, Aug 28, 2013 at 3:58 PM, Ista Zahn wrote: > Or go all the way and put > > options(stringsAsFactors = FALSE) > > at the top your script or in your .Rprofile. This will prevent this > kind of annoyance in the future without having to say stringsAsFactors > = FALSE all the time. I go ba

Re: [R] why is this a factor?

2013-08-28 Thread Ista Zahn
Or go all the way and put options(stringsAsFactors = FALSE) at the top your script or in your .Rprofile. This will prevent this kind of annoyance in the future without having to say stringsAsFactors = FALSE all the time. Best, Ista On Wed, Aug 28, 2013 at 5:19 PM, arun wrote: > Hi, > Try: > i

Re: [R] Legend formatting (ggplot2)

2013-08-28 Thread Ista Zahn
Hi Robert, Your legend is for fill, not color, so you need guides(fill = guide_legend(nrow = 3)) instead of guides(colour = guide_legend(nrow = 3)) Best, Ista On Wed, Aug 28, 2013 at 5:09 PM, Robert Lynch wrote: > I am having trouble getting my legend to format the way I want it to. I > sus

Re: [R] new.env() and attach for write?

2013-08-28 Thread ivo welch
duh! Ivo Welch (ivo.we...@gmail.com) http://www.ivo-welch.info/ J. Fred Weston Professor of Finance Anderson School at UCLA, C519 Director, UCLA Anderson Fink Center for Finance and Investments Free Finance Textbook, http://book.ivo-welch.info/ Editor, Critical Finance Review, http://www.cri

Re: [R] new.env() and attach for write?

2013-08-28 Thread Hadley Wickham
On Wed, Aug 28, 2013 at 4:32 PM, ivo welch wrote: > is it possible to temporarily change the destination environment where > objects are written to? I am thinking > > a <- new.env() > attach(a) > ### run some code, such as... > b <- function(x) x > detach(a) > a$b > > obviously, this

Re: [R] Help with data frame conversion to contingency table

2013-08-28 Thread Rui Barradas
Hello, If you want to perform a chi suqare test, you don't need to make a contingency table. From the help page for ?chisq.test, section Details: "If x is a matrix with at least two rows and columns, it is taken as a two-dimensional contingency table" So all you need is to pass a two column

[R] Fisher test for a more than two group of genes‏

2013-08-28 Thread Gabriel Wajnberg
Good Afternoon, My name is Gabriel, I'm doing an analysis if there is increase or decrease in dependence on the mutated genes, using 3 or more genes using the fisher exact test.I performed with success an analysis for two genes using fisher.test( ). example of the 2x2 contigency table:

Re: [R] Welcome to the "R-help" mailing list

2013-08-28 Thread Gabriel Wajnberg
Good Afternoon, My name is Gabriel, I'm doing an analysis if there is increase or decrease in dependence on the mutated genes, using 3 or more genes using the fisher exact test.I performed with success an analysis for two genes using fisher.test( ). example of the 2x2 contigency table:

Re: [R] Narrowing values collected from .txt file

2013-08-28 Thread Morway, Eric
A relatively concise, commented, working solution to the problem originally motivating this thread was found (below). I suspect the approach I've taken has a major inefficiency through the use of the "scan" statement appearing inside the function "g". The way the code works right now, it has to r

[R] new.env() and attach for write?

2013-08-28 Thread ivo welch
is it possible to temporarily change the destination environment where objects are written to? I am thinking a <- new.env() attach(a) ### run some code, such as... b <- function(x) x detach(a) a$b obviously, this is wrong. attach() only attaches for read access. I could copy the gl

Re: [R] mcapply not using more than 1 core

2013-08-28 Thread joe meiring
Yeah it seems like read.csv is blocking concurrent reads, can anyone verify if that is true? If so, is there a better way to read in csv files into a data frame? On Wed, Aug 28, 2013 at 8:50 AM, joe meiring wrote: > I'll be that one does give me 1 second. What I'm really trying to do is > proces

[R] Problem with "Peaks" package

2013-08-28 Thread Wildgruber, Christoph U.
Hi, I started evaluating the 'Peaks' package a couple of months ago and found it to be quite useful. Getting back to it last week I had to set up my R environment due to hardware changes again. The Peaks package loads with no problem. After successfully reinstalling all packages (RedHat 4.4.7-

Re: [R] scale breaks

2013-08-28 Thread Rolf Turner
On 29/08/13 05:03, Sarah Goslee wrote: Yes. Using my rudimentary telepathic powers, I suppose that you also want to know how to do it, not just whether it has been done. In that case, perhaps you should look at axis.break() from the plotrix package. (In response to the question, from S

[R] Help with data frame conversion to contingency table

2013-08-28 Thread SHASHWAT MISHRA
Hi, I am a beginner at R and do not have a strong background in statistics. I hope somebody can help me with this. I have a data frame which looks like this Facial.Type North.Indians South.Indians 1 Leptoprosopic96 115 2 Hyperleptoprosopic 189

Re: [R] list to data frame

2013-08-28 Thread farnoosh sheikhi
Thanks a lot. That worked perfectly.   Best,Farnoosh Sheikhi Sent: Wednesday, August 28, 2013 10:37 AM Subject: Re: list to data frame If the expected result is data.frame()  as.data.frame(t(as.data.frame(lapply(dat1,sum# would be data.frame.  But, not

Re: [R] netlogo r-extension loadlibrary() failures

2013-08-28 Thread Rolf Turner
On 28/08/13 20:17, Prof Brian Ripley wrote: [That is Microsoft, whose messages are infamously accurate but maximally uninformative.] Fortune nomination. cheers, Rolf __ R-help@r-project.org mailing list https://stat.ethz.ch/mail

Re: [R] why is this a factor?

2013-08-28 Thread arun
Hi, Try:  iris1<-data.frame(iris,annot=c(""),stringsAsFactors=FALSE) str(iris1) #'data.frame':    150 obs. of  6 variables: # $ Sepal.Length: num  5.1 4.9 4.7 4.6 5 5.4 4.6 5 4.4 4.9 ... # $ Sepal.Width : num  3.5 3 3.2 3.1 3.6 3.9 3.4 3.4 2.9 3.1 ... # $ Petal.Length: num  1.4 1.4 1.3 1.5 1.4 1.7

Re: [R] why is this a factor?

2013-08-28 Thread Sarah Goslee
Hi Ed, Because that's the default for data.frame(), and a lot of people trip over it just as you did. It's an easy fix: R> data(iris) R> iris <- data.frame(iris, annot=c(""), stringsAsFactors=FALSE) R> iris[1,"annot"]<-"annotation" Thanks for the very useful reproducible example. Sarah On Wed,

Re: [R] Legend formatting (ggplot2)

2013-08-28 Thread Robert Lynch
I am having trouble getting my legend to format the way I want it to. I suspect it is something simple. > > the code I have is > library(ggplot2) > ggplot(Chem.comp, aes(Course, GRADE.)) + geom_boxplot(notch = > TRUE,aes(fill = COHORT))+ > labs(title = "Comparison between ISE cohorts and Peers

Re: [R] why is this a factor?

2013-08-28 Thread Nordlund, Dan (DSHS/RDA)
See >?data.frame In particular, the stringsAsFactors parameter which defaults to TRUE. Hope this is helpful, Dan Daniel J. Nordlund Washington State Department of Social and Health Services Planning, Performance, and Accountability Research and Data Analysis Division Olympia, WA 98504-5204

[R] why is this a factor?

2013-08-28 Thread Ed Siefker
I have a table, and I want a new column to add some annotations to. But it ends up as a factor instead of characters, and won't let me add arbitrary text. > data(iris) > iris<-data.frame(iris,annot=c("")) > iris[1,"annot"]<-"annotation" Warning message: In `[<-.factor`(`*tmp*`, iseq, value = "anno

[R] Assessing temporal correlation in GAM with irregular time steps

2013-08-28 Thread Worthington, Thomas A
I have constructed a GAM using the package mgcv to test whether the lengths of an emerging insect (Length) varies with day of the year (DOY) and between two sites (SiteCode). The data are collected at irregular time steps ranging from 2 days to 20 days between samples. The GAM takes the form M3

Re: [R] Parallel version of Map(rather, mapply)

2013-08-28 Thread Saptarshi Guha
thanks On Wed, Aug 28, 2013 at 11:58 AM, Greenberg, Jonathan wrote: > Hi Saptarshi: > > There are quite a few parallel mapply's out there -- my recommendation is > to use the foreach package, since it allows you to be flexible in the > parallel backend, and you don't have to write two statements

Re: [R] Plotting time vs number

2013-08-28 Thread jim holtman
What you need to do is to create the plot without an x-axis (xaxt = 'n') and then add your own values on the axis with 'axis' x <- read.table(text = " Time Kbytes RSS Dirty_Mode 1 11:42:02 2691296 15997961582736 2 11:43:42 2691396 15998041582744 3 11:45:22 2691496 1599804158

Re: [R] Parallel version of Map(rather, mapply)

2013-08-28 Thread Greenberg, Jonathan
Hi Saptarshi: There are quite a few parallel mapply's out there -- my recommendation is to use the foreach package, since it allows you to be flexible in the parallel backend, and you don't have to write two statements (a sequential and a parallel statement) -- if a parallel backend is running,

[R] Parallel version of Map(rather, mapply)

2013-08-28 Thread Saptarshi Guha
Hello, I find Map to be nice interface to mapply. However Map calls mapply which in turn calls mapply via .Internal. Is there a parallel version of mapply (like mcapply) or do I need to write this myself? Regards Saptarshi [[alternative HTML version deleted]] ___

Re: [R] Sensitivy / Specificity and nulls

2013-08-28 Thread David Winsemius
On Aug 28, 2013, at 7:35 AM, Donald Catanzaro wrote: > Hi All, > > Since R is used primarily as a statistical package by individuals using > statistics to answer questions it makes sense to ask a question such as > this. Oftentimes individuals have encountered similar issues as the poster > and

Re: [R] scale breaks

2013-08-28 Thread Sarah Goslee
On Wed, Aug 28, 2013 at 1:35 PM, Bert Gunter wrote: > Sarah et. al.: > > Heh heh. > > However .. my always fallible judgment says, don't do it. Axis scale breaks > invite misreading, Consider alternatives: > http://stats.stackexchange.com/questions/1764/what-are-alternatives-to-broken-axes Well,

Re: [R] scale breaks

2013-08-28 Thread Bert Gunter
Sarah et. al.: Heh heh. However .. my always fallible judgment says, don't do it. Axis scale breaks invite misreading, Consider alternatives: http://stats.stackexchange.com/questions/1764/what-are-alternatives-to-broken-axes Cheers, Bert On Wed, Aug 28, 2013 at 10:03 AM, Sarah Goslee wrote: >

Re: [R] Max/min problems in multivariate calculus

2013-08-28 Thread Bert Gunter
Homework? We don't do homework here... -- Bert On Wed, Aug 28, 2013 at 10:02 AM, Edoardo Baldoni wrote: > Dear R-help, > > I would like to ask you how to find the critical points of a function of > several variables such as the following one: > > x = seq(-10,10,0.2) > y = seq(-10,10,0.2) > z

Re: [R] list to data frame

2013-08-28 Thread arun
Hi, set.seed(249) dat1<- as.data.frame(matrix(sample(1:20,40*20,replace=TRUE),ncol=20)) #Based on your code:  vecNew<-sort(t(as.data.frame(lapply(dat1,sum))),decreasing=TRUE)[1:10] #or vec1<-sort(unlist(lapply(dat1,sum),use.names=FALSE),decreasing=TRUE)[1:10]  identical(vec1,vecNew) #[1] TRUE #

Re: [R] scale breaks

2013-08-28 Thread Sarah Goslee
On Wed, Aug 28, 2013 at 12:52 PM, Shane Carey wrote: > Hi, > > Has anyone ever created scale breaks in R something like what is shown here > in the section, Use a Scale Break, > http://www.r-bloggers.com/graphing-highly-skewed-data/ Yes. Using my rudimentary telepathic powers, I suppose that yo

[R] Max/min problems in multivariate calculus

2013-08-28 Thread Edoardo Baldoni
Dear R-help, I would like to ask you how to find the critical points of a function of several variables such as the following one: x = seq(-10,10,0.2) y = seq(-10,10,0.2) zfunc = function(x,y) x^2 + y^2 z = outer(x,y,zfunc) persp(x,y,z,theta = 30,phi=1,ticktype='detailed') Thanks Edoardo

[R] scale breaks

2013-08-28 Thread Shane Carey
Hi, Has anyone ever created scale breaks in R something like what is shown here in the section, Use a Scale Break http://www.r-bloggers.com/graphing-highly-skewed-data/ Thanks -- Shane [[alternative HTML version deleted]] __ R-help@r-projec

Re: [R] can you please give guidance for generating future prediction values from existing heart disease data

2013-08-28 Thread David Winsemius
On Aug 28, 2013, at 8:14 AM, Bala Chand wrote: > Hi > can you please give guidance for generating future prediction values from > existing heart disease data and we want to know the which type of models > are using for generating the future prediction. can you please tell me how > can i write th

Re: [R] break on yaxis of boxplot

2013-08-28 Thread Shane Carey
Sorry, I found what I was doing wrong!! Thanks On Wed, Aug 28, 2013 at 5:09 PM, Shane Carey wrote: > Hi, > > I am trying to create a break on the y-axis of a boxplot using axis.break. > My data range from 4 to 12 with a break at 11. > > I have tried the following code: > > A<-c(4,5,6,7,8,9,10,

Re: [R] Using !is.na() in a HAVING clause in sqldf() XXXX

2013-08-28 Thread Alex Gilgur
Phil, sorry; I didn't see your response. You are right; the "IS" is superfluous On Wednesday, August 28, 2013 8:56:19 AM UTC-7, Alex Gilgur wrote: > > "having" is right; use "HAVING Premie IS NOT NULL" instead. The sqldf > package has a SQLite database running behind it. All NA get internally

[R] glmmPQL: how to get std error of fitted values?

2013-08-28 Thread Ramona Lall
Hello R-Users, I am using glmmPQL (library MASS) on time-series count data that are aggregated by zipcode. My model includes natural cubic splines for season and day-of-week as fixed effects and random intercept term for zipcode. I need to extract the fitted values AND the standard error of the

Re: [R] Using !is.na() in a HAVING clause in sqldf() XXXX

2013-08-28 Thread Alex Gilgur
"having" is right; use "HAVING Premie IS NOT NULL" instead. The sqldf package has a SQLite database running behind it. All NA get internally converted to NULL, which is the standard representation for N/A in SQL, and then they become in the data.frame that is returned by the sqldf command C

[R] can you please give guidance for generating future prediction values from existing heart disease data

2013-08-28 Thread Bala Chand
Hi can you please give guidance for generating future prediction values from existing heart disease data and we want to know the which type of models are using for generating the future prediction. can you please tell me how can i write the formula for future predictive values. can you see th

Re: [R] mcapply not using more than 1 core

2013-08-28 Thread joe meiring
I'll be that one does give me 1 second. What I'm really trying to do is process a bunch of (~300) relatively large CSV files simultaneously. Something like this: testFunc <- function(fileName) { print(fileName) df <- process_raw_data(fname) # process_raw_data just reads in CSV file and

[R] break on yaxis of boxplot

2013-08-28 Thread Shane Carey
Hi, I am trying to create a break on the y-axis of a boxplot using axis.break. My data range from 4 to 12 with a break at 11. I have tried the following code: A<-c(4,5,6,7,8,9,10,12) B<-c(4,5,6,7,8,9,10,12) axis(2,A,B) Where A and B are the tick marks and labels respectively? However the plot w

Re: [R] labcurve - use of putKey function

2013-08-28 Thread Igor Ribeiro
Thank you so much, Pascal. Works perfectly! :) On Tue, Aug 27, 2013 at 8:14 PM, Pascal Oettli wrote: > Hello, > > The following works for me: > > library(Hmisc) > timeseries<-c(1950,2000,2050,2100) > dataseries<-seq(1:4) > dataseries1<-c(1,2,3,4) > dataseries2<-c(1.5,2.5,3.5,4) > plot(timeserie

[R] Stepwise selection with qAIC and qBIC

2013-08-28 Thread Xochitl CORMON
Dear list, I am currently working with presence/absence GLM. Therefore I am using binomial family and selection my models this way : null <- glm(respvarPAT ~ 1 , family = binomial, data = datafit) full <- glm(respvarPAT ~ CSpp + FSpp + Gpp + Mpp + Ppp + Lpp + TempPoly2 + DepthPoly2 + DepthPo

Re: [R] find row name with specific value

2013-08-28 Thread MacQueen, Don
I would tend to go for very basic approach. Since there is no column of data named 'year' I will assume that the row names contain the year. min( row.names(mydata)[mydata$samp.depth==2] ) Although it's not pretty, I think it comes close to representing in R the language the request as presented i

[R] ASA Conference on Statistical Practice

2013-08-28 Thread Adams, Jean
R users, The deadline for poster abstracts is tomorrow, August 29, for the 2014 ASA Conference on Statistical Practice, February 20-24, Tampa, Florida, USA. Based on a survey of the 2013 CSP attendees there was particular interest in R. It would be nice to see contributions from the R community

Re: [R] correlation between rows of different data frames

2013-08-28 Thread Bert Gunter
You appear to have no idea what you are doing. I suggest you post on the Bioconductor list, not here, for guidance. Better yet, get help locally from someone who does know what they are doing. Cheers, Bert On Wed, Aug 28, 2013 at 6:36 AM, Robin Mjelle wrote: > Hi, > > I have two data frames with

Re: [R] Sensitivy / Specificity and nulls

2013-08-28 Thread Donald Catanzaro
Hi All, Since R is used primarily as a statistical package by individuals using statistics to answer questions it makes sense to ask a question such as this. Oftentimes individuals have encountered similar issues as the poster and can quickly point them in the correct direction - that is all I am

Re: [R] mcapply not using more than 1 core

2013-08-28 Thread joe meiring
SO what could possibly be causing this? Has anyone encountered this? This is RedHat Enterprise 5.7. On Tue, Aug 27, 2013 at 11:14 PM, Prof Brian Ripley wrote: > On 28/08/2013 06:54, joe meiring wrote: > >> This does speed up on an OsX install, so something must be wacky with the >> linux install

[R] behaviour of .cbind.ts

2013-08-28 Thread Vaidotas Zemlys
Hi, Does anyone why the following code produces different results? a <- cbind(1:10,1:10) b <- a colnames(a) <- c("a","b") colnames(b) <- c("c","d") colnames(cbind(a,b)) > [1] "a" "b" "c" "d" colnames(cbind(ts(a),ts(b))) > [1] "ts(a).a" "ts(a).b" "ts(b).c" "ts(b).d" Is this or compatibility r

[R] correlation between rows of different data frames

2013-08-28 Thread Robin Mjelle
Hi, I have two data frames with time serie datamatrix. I want to pick a row X from the first matrix and see if it correlates with row Y in the second matrix. These are gene expression values and I probaly need to do some scaling first, but I wonder if you have any suggestions on how to do the corr

Re: [R] Sensitivy / Specificity and nulls

2013-08-28 Thread Bert Gunter
This is not an R question. Post elsewhere. Better yet, contact a local statistical consultant. -- Bert On Wed, Aug 28, 2013 at 7:18 AM, Donald Catanzaro wrote: > Good Day All, > > I am working with a diagnostic test and comparing the new test to an old > test. Normally I would be able to calcul

Re: [R] Sensitivy / Specificity and nulls

2013-08-28 Thread Donald Catanzaro
Good Day All, I am working with a diagnostic test and comparing the new test to an old test. Normally I would be able to calculate sensitivity and specificity quite easily. However, the 'gold standard' that I am comparing my new diagnostic with is really 'gold-plated' in that sometimes the 'gold

Re: [R] named lmer.models in do.call(anova,models)

2013-08-28 Thread Ben Bolker
Toth, Denes ttk.mta.hu> writes: > > > Sorry, I missed to attach the sessionInfo, here it goes: > > > sessionInfo() > R version 3.0.1 (2013-05-16) > Platform: x86_64-pc-linux-gnu (64-bit) > [snip] > other attached packages: > [1] lme4_1.1-0 Matrix_1.0-12 lattice_0.20-15 [snip] > > Con

Re: [R] Keep a record of the observations deleted because of missing

2013-08-28 Thread arun
Hi, The question is not clear. May be this helps: set.seed(29) dat1<- as.data.frame(matrix(sample(c(0:7,NA),10*10,replace=TRUE),ncol=10))  which(is.na(dat1))  #[1] 11 23 24 28 37 43 47 72 77 87 #missing value index for each column sapply(dat1,function(x) which(is.na(x))) A.K. how to Keep a

Re: [R] Plotting time vs number

2013-08-28 Thread Jannis
Hi Mohan, as I said, it is difficult to help you without beeing able to reproduce your plots. Could you please send to the list: 1. the exact command you use to create the plot 2. The output of dput(data) Thanks Jannis On 28.08.2013 14:35, mohan.radhakrish...@polarisft.com wrote: Hi, plo

Re: [R] calendar axis for forecasts

2013-08-28 Thread Sudheer Joseph
Hi, I was trying to get calender axis for a arima time series forecast.I could not succeed even though I used zoo time series object. Please suggest if there is a way to plot with calender axis. Forgot to attach the link! The working code is available at below link. -- https://docs.goog

Re: [R] R Language Newbie

2013-08-28 Thread Zsurzsa Laszlo
Hey Sure sorry for the mistake, That was i meant to be also. I this what you were searching? - - László-András Zsurzsa,- - Msc. Infromatics, Technical University Mun

Re: [R] named lmer.models in do.call(anova,models)

2013-08-28 Thread Toth, Denes
Sorry, I missed to attach the sessionInfo, here it goes: > sessionInfo() R version 3.0.1 (2013-05-16) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8LC_MES

[R] named lmer.models in do.call(anova,models)

2013-08-28 Thread Toth, Denes
Hi, For some reason do.call on anova fails if the models are named lmer objects. Consider the following example: library(lme4) models <- list( lmer(Reaction ~ Days + (1| Subject), sleepstudy), lmer(Reaction ~ Days + (Days | Subject), sleepstudy)) # # models is an unnamed list, do.call wor

[R] calendar axis for forecasts

2013-08-28 Thread Sudheer Joseph
Hi, I was trying to get calender axis for a arima time series forecast.I could not succeed even though I used zoo time series object. Please suggest if there is a way to plot with calender axis. -- with best regards Sudheer *

Re: [R] R Language Newbie

2013-08-28 Thread arun
HI, I was talking about another method to get the same result:  myVector[1:100%%2==1] identical(myVector[1:100%%2==1],myVector[seq(1,100,by=2)]) #[1] TRUE Hope it helps. A.K. From: Zsurzsa Laszlo To: arun Cc: R help Sent: Wednesday, August 28, 2013 5:21

Re: [R] SPI package error

2013-08-28 Thread arun
Hi, Did you mean this?  dat3$year<-1901:2009  dat4<-dat3[,c(13,1:12)] head(dat4,2) #  year   Jan    Feb    Mar Apr   May    Jun    Jul #1 1901    NA NA NA  NA 1.0309351 1.76204866 1.87906713 #2 1902 -1.195531 -0.8941016 -0.4601555 0.15921 0.3515

Re: [R] R Language Newbie

2013-08-28 Thread arun
HI, 'odd' and 'oddVector' are the same.  identical(odd,oddVector) #[1] TRUE  identical(odd,myVector[seq(1,100,by=2)])  myVector# #[1] TRUE A.K. From: Zsurzsa Laszlo To: arun Cc: R help Sent: Wednesday, August 28, 2013 8:58 AM Subject: Re: [R] R Language

Re: [R] SPI package error

2013-08-28 Thread arun
HI Catalin, This seems to work: spi(6,"spi.txt",1963,2010,"Standardized Precipitation Index - Rio Grande do Norte State",2,"years","months") >From the source code: spi #on your R console ---  if (nargs < 3) {     return("Error: very small number of arguments")

Re: [R] R Language Newbie

2013-08-28 Thread Zsurzsa Laszlo
Hello, #3 myVector <- c(1:100) oddVector <- myVector[c(1:100) %% 2 == 1] odd <- myVector[c(1:100) %% 2 == 1] identical( odd, seq(1,100,by=2)) gives me FALSE #3 Is this what you sugg

Re: [R] SPI package error

2013-08-28 Thread arun
Hi, str(dat2) # ts [1:1308, 1] NA NA NA NA 1.03 ...  #- attr(*, "tsp")= num [1:3] 1 110 12 # - attr(*, "dimnames")=List of 2  # ..$ : NULL  # ..$ : chr "Series 1" If you want it as a data.frame, dat3<-as.data.frame(matrix(as.numeric(dat2),ncol=12,byrow=TRUE)) colnames(dat3)<- month.abb  head(dat3,

Re: [R] Plotting time vs number

2013-08-28 Thread mohan . radhakrishnan
Hi, plot(strptime(data$Time,"%H:%M:%S"),data$Kbytes,type="l",col = "blue", ylab="", xlab="",las=2,lwd=2.5, lty=1,cex.axis=1.5) strptime functions draws a proper graph but now all the time values are not in the x-axis. > 1 11:42:02 2691296 > 2 11:43:42 2691396 > 3 11:45:22 2691496 > 4 11:47:02

Re: [R] SPI package error

2013-08-28 Thread arun
Hi, If you wanted the 'fitted' values:  source("cat1.txt") #dat1 is the dataset dat2<-dat1$fitted A.K. From: catalin roibu To: arun Sent: Wednesday, August 28, 2013 8:26 AM Subject: Re: [R] SPI package error I have another question, how can extract 12 mo

Re: [R] Plotting time vs number

2013-08-28 Thread mohan . radhakrishnan
Hi Jannis, I have tried that. It doesn't work. Jumps are not there in my other graphs using numbers. Does this anything to do with time series ? Can I just convert this time representation into milliseconds and plot the graph ? The x-axis should still show this time format though(names.arg ? )

[R] SPI package error

2013-08-28 Thread catalin roibu
Dear all! I find a problem from SPI package. When I try a 6 months scale I have this error: write.table(test,file="spi.txt",quote=FALSE,row.names=TRUE) spi3<-spi(6,"spi.txt",1902,2009) Error in paste(title, sep = "") : argument "title" is missing, with no default If I use 3 months scale everythi

Re: [R] Plotting time vs number

2013-08-28 Thread Jannis
Hi Mohan, i am not sure whether I understand your question correctly. Without beeing able to easily reproduce your plot, I would guess that the "breaks" come from the type='b' option you choose. When you use type ='l', the line would be continuous (though the jumps would still be there). If y

[R] Plotting time vs number

2013-08-28 Thread mohan . radhakrishnan
Hi, The plot function draws a broken line. The graph breaks when it jumps from a lower value to a higher value with a big break in between. Why does this type of data not use 'pch' or 'type'. When I plot I don't indicate anywhere it is time. > head(data) Time Kbytes RSS Dirty

Re: [R] netlogo r-extension loadlibrary() failures

2013-08-28 Thread John Kane
> -Original Message- > From: rip...@stats.ox.ac.uk > Sent: Wed, 28 Aug 2013 09:17:01 +0100 > To: r-help@r-project.org > [That is Microsoft, whose messages are infamously accurate but >maximally > uninformative.] I don't think it's on-topic enough to be a fortune but it's going into my c

Re: [R] error installing ggm package

2013-08-28 Thread Ista Zahn
On Tue, Aug 27, 2013 at 8:07 PM, Pascal Oettli wrote: > Hello, > > "graph" is a Bioconductor package. you can install it from http://www.bioconductor.org/packages/release/bioc/html/graph.html > > Regards, > Pascal > > > 2013/8/28 Lianne Schroeder > >> I have tried to find pkg graph and R report

Re: [R] R Language Newbie

2013-08-28 Thread Zsurzsa Laszlo
Can you specify you're task? I don't understand totally what you need to do? You're already getting odd numbers with : seq(1,100,by=2) - - László-András Zsurzsa,- -

Re: [R] netlogo r-extension loadlibrary() failures

2013-08-28 Thread Prof Brian Ripley
This is not an R question, and you have not provided the 'at a minimum information' the posting guide asked of you. But this seems to be Windows, and >LoadLibrary failure: The specified module could not be found. is a Windows error message. You seem to misunderstand what it means: check

Re: [R] Questions before installation

2013-08-28 Thread Tyagi, Shalabh
Thank you Ligges for your valuable inputs. This will definitely be of great help. Best Regards, Shalabh Tyagi -Original Message- From: Uwe Ligges [mailto:lig...@statistik.tu-dortmund.de] Sent: 28 August 2013 03:40 To: Tyagi, Shalabh Cc: r-help@r-project.org; Tewari, Vishesh Subject: Re:

[R] netlogo r-extension loadlibrary() failures

2013-08-28 Thread Mike Landis
Trying to access R from Netlogo5 (using the NetLogo R-Extension), running the configuration validation tests in NetLogo5/extensions/r/Systemcheck.nlogo, I get several loadlibrary() errors ... in rJava Check2, > library(rJava); .path.package('rJava') Error : .onLoad failed in loadNamespace() fo