Re: [R] error using nls with logistic derivative

2012-04-17 Thread peter dalgaard
On Apr 17, 2012, at 06:23 , Francisco Mora Ardila wrote: > Hi > > I´m trying to fit a nonlinear model to a derivative of the logistic function > > y = a/(1+exp((b-x)/c)) (this is the parametrization for the SSlogis function > with nls) > > The derivative calculated with D function is: > >> l

[R] Summary about how to divide data by week

2012-04-17 Thread Stefano Sofia
Thank you to Ozgur, who gave me the hints for an easy solution. There are the commands that work for my case: mean(my_dataframe$Freq[my_dataframe$month == 5 & my_dataframe$day %in% c(1:7)]) mean(my_dataframe$Freq[my_dataframe$month == 5 & my_dataframe$day %in% c(8:14)]) ... Stefano Sofia PhD

Re: [R] Can a matrix have 'list' as rows/columns?

2012-04-17 Thread Patrick Burns
That is a fine section of 'The R Inferno' but I don't think it applies to your problem. The answer to your question in the subject line is obviously "yes". It happens when the matrix (or more generally any array) is of mode "list". A useful example of this is in Circle 8.1.8. http://www.burns-

Re: [R] Approximately how big is an installation of all packages.

2012-04-17 Thread Keith Weintraub
Thanks. That's a great help! KW On Apr 16, 2012, at 1:08 PM, Prof Brian Ripley wrote: Note that the answer also depends on the platform (Uwe probably has two archs on Windows and no debug info in his DLLs), whether you byte-compile the packages, the optimization flags you use when co

Re: [R] error using nls with logistic derivative

2012-04-17 Thread Gabor Grothendieck
On Tue, Apr 17, 2012 at 12:23 AM, Francisco Mora Ardila wrote: > Hi > > I´m trying to fit a nonlinear model to a derivative of the logistic function > > y = a/(1+exp((b-x)/c)) (this is the parametrization for the SSlogis function > with nls) > > The derivative calculated with D function is: > >>

Re: [R] packages install dependencies

2012-04-17 Thread mail.bioinfo
Hi Uwe Thanks for your answer. I tried to install the packages "marginalmodelplots_0.4.2.tar.gz" from a local repository "/home/bioadm/install/R_packages/120416/" using your suggestion (i.e. install.packages(, contriburl="/home/joel/RPacks")) I paste below the command install.packages("/

[R] Test-Predict R survival analysis

2012-04-17 Thread Sandrine Imbeaud
Hi, I'm trying to use the R Survival analysis on a windows 7 system. The input data format is described at the end of this mail. 1/ I tried to perform a survival analysis including stratified variables using the following formula. cox.xtab_miR=coxph(Surv(time, status) ~ miR + strata(sex,nbligne,

Re: [R] Can a matrix have 'list' as rows/columns?

2012-04-17 Thread David Winsemius
On Apr 17, 2012, at 12:13 AM, Worik R wrote: After a lot of processing I get a matrix into M. I expected each row and column to be a vector. But it is a list. This behavior is not the result of limitation in how R's sapply might have processed a purely numeric set of results, but is bec

[R] loss of information in pdf plots

2012-04-17 Thread Unger, Kristian, Dr.
Hi there is it possible that pdfs generated using the pdf() function with default settings leads to loss of information? I was plotting copy number changes from Agilent 180k data in form of rectangles (rect()) while each rectangle represents one region of copy number change. When plotting into

Re: [R] system command to a specific shell (bash)

2012-04-17 Thread Uwe Ligges
On 17.04.2012 01:26, MacQueen, Don wrote: I believe that shell() was superceded by system(), quite a long time ago. Not really, under Windows, shell() will start a shell while system() won't. Uwe Ligges However, I get this: foo<- system('printenv',intern=TRUE) ; foo[grepl('SHELL',foo)]

Re: [R] loss of information in pdf plots

2012-04-17 Thread Petr PIKAL
Hi > > Hi there > > is it possible that pdfs generated using the pdf() function with default > settings leads to loss of information? I was plotting copy number changes > from Agilent 180k data in form of rectangles (rect()) while each rectangle > represents one region of copy number change

Re: [R] packages install dependencies

2012-04-17 Thread Uwe Ligges
On 17.04.2012 10:57, mail.bioi...@fr.netgrs.com wrote: Hi Uwe Thanks for your answer. I tried to install the packages "marginalmodelplots_0.4.2.tar.gz" from a local repository "/home/bioadm/install/R_packages/120416/" using your suggestion (i.e. install.packages(, contriburl="/home/joel

Re: [R] loss of information in pdf plots

2012-04-17 Thread Unger, Kristian, Dr.
Thanks Petr. Unfortunately this does not help. Kristian Am 17.04.2012 um 14:18 schrieb Petr PIKAL: > Hi > >> >> Hi there >> >> is it possible that pdfs generated using the pdf() function with default > >> settings leads to loss of information? I was plotting copy number > changes >> from Agilent

Re: [R] correlation matrix between data from different files

2012-04-17 Thread jeff6868
Hello Rui, Thanks a lot for your answer. Hou hoped that your script would help me? I answer you: It is WON-DER-FUL! It works very well! I had first some difficulties to adapt it to my data, but I succeeded afterwords when I made a test between 2 stations. It's not perfect yet (I still have to mo

Re: [R] loss of information in pdf plots

2012-04-17 Thread Uwe Ligges
On 17.04.2012 14:35, Unger, Kristian, Dr. wrote: Thanks Petr. Unfortunately this does not help. In that case, we need a reproducible example. Uwe Ligges Kristian Am 17.04.2012 um 14:18 schrieb Petr PIKAL: Hi Hi there is it possible that pdfs generated using the pdf() function with

[R] How to extract overall effect in from glmer object?

2012-04-17 Thread friszuur
Hello, I am using glmer() from the lme4-package to run generalized linear mixed models. Is there a way to extract the overall variable effects from the model output object? For example, for linear models using lm() I use the anova() function to extract these results, however this is not possible

[R] differents behaviour of packages depending on rJava under 32 and 64 bit versions of R 2.14.2

2012-04-17 Thread Olivier Eterradossi
Hi listeRs, Maybe I have missed something, but I am facing a problem I don't understand even after reading archives and manuals (…maybe not carefully enough !) : On my PC (64-bit OS, Intel Xeon CPU , two L5506@2.13 GHz processors, 12 Go RAM) under Windows 7 SP1, I run both 32-bit (i386-

Re: [R] loss of information in pdf plots

2012-04-17 Thread Marc Schwartz
On Apr 17, 2012, at 7:08 AM, Unger, Kristian, Dr. wrote: > Hi there > > is it possible that pdfs generated using the pdf() function with default > settings leads to loss of information? I was plotting copy number changes > from Agilent 180k data in form of rectangles (rect()) while each rectang

Re: [R] loss of information in pdf plots

2012-04-17 Thread Prof Brian Ripley
There must be loss of accuracy: coordinates in PDF are recorded to finite accuracy (for pdf(), something like 0.01" as I recall). In addition, the R plot engine assumes finite accuracy, a minimum width for lines And as people are pointing out, so do PDF viewers. Do not expect to zoom in

Re: [R] packages install dependencies

2012-04-17 Thread Uwe Ligges
On 17.04.2012 15:21, mail.bioi...@fr.netgrs.com wrote: Hi I checked inside the directory but I have the PACKAGE file as you can see ls /home/bioadm/install/R_packages/test/PACKAGES PACKAGES PACKAGES.gz I created them using this command write_PACKAGES("../test/", type="win.binary" ) Er

Re: [R] differents behaviour of packages depending on rJava under 32 and 64 bit versions of R 2.14.2

2012-04-17 Thread Prof Brian Ripley
On 17/04/2012 14:00, Olivier Eterradossi wrote: Hi listeRs, Maybe I have missed something, but I am facing a problem I don't understand even after reading archives and manuals (…maybe not carefully enough !) : 64-bit rJava needs 64-bit Java: 32-bit rJava needs 32-bit Java. You can install

Re: [R] loss of information in pdf plots

2012-04-17 Thread Unger, Kristian, Dr.
Thanks Uwe. Please use the following below to reproduce the problem. Also, find the plots as I get them in my Dropbox: http://dl.dropbox.com/u/42940015/Rplot.pdf (plot as I get it when I use the "save as..." function from the Mac GUI menu. http://dl.dropbox.com/u/42940015/test.pdf (plot using th

Re: [R] loss of information in pdf plots

2012-04-17 Thread Uwe Ligges
As far as I can see, the recommended way of using pdf() plot dev.off() works precisely, just zoom in far enough so that your screen is able to display the gaps, e.g. by zooming in by 6400% Uwe Ligges On 17.04.2012 15:53, Unger, Kristian, Dr. wrote: Thanks Uwe. Please use the following be

Re: [R] differents behaviour of packages depending on rJava under32 and 64 bit versions of R 2.14.2

2012-04-17 Thread Olivier Eterradossi
Thank you Prof., As always, simple things need to thing carefully :-( I have missed that point, and also the existence of rJava forums. ATB, Olivier -Message d'origine- De : Prof Brian Ripley [mailto:rip...@stats.ox.ac.uk] Envoyé : mardi 17 avril 2012 15:32 À : Olivier Eterradossi Cc : r

Re: [R] error using nls with logistic derivative

2012-04-17 Thread John C Nash
Peter Dalgaard has already given some indications. However, nls() is pretty fragile as a solver in my experience. I'm in the process of putting some more robust (in the computing and not statistical sense) solvers in the nlmrt package on the R-forge project at https://r-forge.r-project.org/R/?g

Re: [R] packages install dependencies

2012-04-17 Thread mail.bioinfo
Hi I checked inside the directory but I have the PACKAGE file as you can see ls /home/bioadm/install/R_packages/test/PACKAGES PACKAGES PACKAGES.gz I created them using this command write_PACKAGES("../test/", type="win.binary" ) I retried the command but I got the same error. install.pa

Re: [R] Partial Dependence and RandomForest

2012-04-17 Thread Liaw, Andy
Note that the partialPlot() function also returns the x-y pairs being plotted, so you can work from there if you wish. As to SD, my guess is you want some sort of confidence interval or band around the curve? I do not know of any theory to produce that, but that may well just be my ignorance.

Re: [R] loss of information in pdf plots

2012-04-17 Thread Unger, Kristian, Dr.
Thanks Uwe, you are right! The reason why it works fine now might be that the borders switch of the rect() function was set to "white" rather than NA when I sent my initial request. This obviously led to drawing of white borders that overlaid some of the tiny blue or red rectangles. However, i

Re: [R] How to create a data.frame from several time series?

2012-04-17 Thread Robert Latest
Hello all, followup to yesterday's question: Part of my confusion was caused by my embarrassing mistake of overwriting the "ppk" function with another object, which of course broke the next iteration of the loop. Secondly, I got exactly what I wanted like this: aggregate.zoo <- function(series)

[R] Function with multiple indices

2012-04-17 Thread cfchang3
Hi, I wrote a function which works for one group but not for multiple groups in several years. Could anyone help me out? The dateset has 3 variables, year, group, and sales. I want to calculate the annual group median adjusted sales performance for observation i in group j and year yr, I do th

Re: [R] loss of information in pdf plots

2012-04-17 Thread Uwe Ligges
On 17.04.2012 16:16, Unger, Kristian, Dr. wrote: Thanks Uwe, you are right! The reason why it works fine now might be that the borders switch of the rect() function was set to "white" rather than NA when I sent my initial request. This obviously led to drawing of white borders that overlaid

[R] puzzling Date math result

2012-04-17 Thread Denis Chabot
Hi, I cannot make a reproducible example easily for my problem, so I'll describe it as best as I can. I merged 2 dataframes but was surprised when one line on the x dataframe did not get a match in the y dataframe, because I knew such a match existed. There was only one "by" variable in the merge

[R] image.plot specify colors for range of data points, please help

2012-04-17 Thread David Lyon
Hi If I had a dataset of the following below and I want to plot colors for this image.plot so that: red for data above 1 black for data between/equal 1 and -1 green for data below -1 normally its: image.plot(data) but how do I add the colors for the range of data points as above? Many thanks

[R] Re : image.plot specify colors for range of data points, please help

2012-04-17 Thread Pascal Oettli
Hi, > image.plot(x, breaks=c(-100,-1,1,100), col=c('green','black','red')) Regards, Pascal - Mail original - De : David Lyon À : "r-help@r-project.org" Cc : Envoyé le : Mercredi 18 avril 2012 0h00 Objet : [R] image.plot specify colors for range of data points, please help Hi If I h

Re: [R] How to extract overall effect in from glmer object?

2012-04-17 Thread Ben Bolker
friszuur gmail.com> writes: > I am using glmer() from the lme4-package to run generalized linear mixed > models. > > Is there a way to extract the overall variable effects from the model output > object? For example, for linear models using lm() I use the anova() function > to extract these res

[R] What functions are available for Quadratically Constrained Quadratic Programming in R?

2012-04-17 Thread Michael
Hi all, Could anybody please point me to the solver function in R on QCQP? The quadprog package seems to be only able to handle the linear constraints... Thank you! [[alternative HTML version deleted]] __ R-help@r-project.org mailing list htt

Re: [R] Re : image.plot specify colors for range of data points, please help

2012-04-17 Thread David Lyon
Thank you so much! - Original Message - From: Pascal Oettli To: David Lyon Cc: "r-help@r-project.org" Sent: Tuesday, April 17, 2012 11:31 AM Subject: Re : [R] image.plot specify colors for range of data points, please help Hi, > image.plot(x, breaks=c(-100,-1,1,100), col=c('green'

[R] Problem accessing .Rdata objects in a loop

2012-04-17 Thread francy
Hi, I am trying to access many .Rdata objects and do some operations with them using a loop. I can load the files but can't access them. The files' names are stored in a character vector called "names". After loading the objects, I can view each one using ls() and see that two objects are present

Re: [R] Summary about how to divide data by week

2012-04-17 Thread Rui Barradas
Hello, I'm glad you have a solution that works. Maybe you could do the same without hard-coding the values 1:7, 8:14. $ library(chron) dat <- with(my_dataframe, paste(month, day, year, sep="/")) week <- cut(chron(dat), breaks="weeks") head(week) tapply(my_dataframe$Freq, week, mean) Hope thi

Re: [R] Function with multiple indices

2012-04-17 Thread Rui Barradas
Hello, In your first call, perf(GROUP11), you're passing a data.frame, in the 'tapply' and 'aggregate' you are passing a vector, x1$SALES, and the operator '$' is not valid. > tapply(x1$SALES, list(x1$YEAR, x1$GROUP), perf) Error in x$SALES : $ operator is invalid for atomic vectors There's anot

Re: [R] Problem accessing .Rdata objects in a loop

2012-04-17 Thread Bert Gunter
Try reading ?load again. It takes a single filename only. Also 'n' is a character, not a symbol for a variable. I think you need to do some reading on basic programming. Try An Introduction to R (part of the distro) to get you going. -- Bert On Tue, Apr 17, 2012 at 8:38 AM, francy wrote: > Hi,

Re: [R] Problem accessing .Rdata objects in a loop

2012-04-17 Thread R. Michael Weylandt
I'm not sure that's francy's problem. This seems to work for me: # Some fake data nms <- letters[1:5] lapply(nms, function(x) assign(x, rnorm(10), .GlobalEnv)) # Make some .Rdata files lapply(nms, function(x) save(list =x, file = paste0(x, ".Rdata"))) # Check they are there list.files() # Bring

Re: [R] What functions are available for Quadratically Constrained Quadratic Programming in R?

2012-04-17 Thread Michael
Looks like we need an SDP solver in R... Any pointers? thanks a lot! On Tue, Apr 17, 2012 at 10:54 AM, Michael wrote: > Hi all, > > Could anybody please point me to the solver function in R on QCQP? > > The quadprog package seems to be only able to handle the linear > constraints... > > Thank

Re: [R] puzzling Date math result

2012-04-17 Thread Calum Polwart
On Tue, 17 Apr 2012 10:44:40 -0400, Denis Chabot wrote: > Hi, > > I cannot make a reproducible example easily for my problem, so I'll > describe it as best as I can. YOU KIND OF NEED ONE... >> a=test1$période[21] > >> b=test2$date[22] > a f > argin-left:5px; width:100%">b > > [1] "2011

Re: [R] puzzling Date math result

2012-04-17 Thread C Polwart (R Stats Only)
On Tue, 17 Apr 2012 10:44:40 -0400, Denis Chabot wrote: >> Hi, >> >> I cannot make a reproducible example easily for my problem, so I'll >> describe it as best as I can. YOU KIND OF NEED ONE... >>> a=test1$période[21] >> >>> b=test2$date[22] >> a x >> in-left: 5px; width: 100%;">b >> >

Re: [R] error using nls with logistic derivative

2012-04-17 Thread Francisco Mora Ardila
It seems to work! Thanks and sorry for the personal message Francisco On Tue, 17 Apr 2012 09:09:24 +0200, peter dalgaard wrote > On Apr 17, 2012, at 06:23 , Francisco Mora Ardila wrote: > > > Hi > > > > I´m trying to fit a nonlinear model to a derivative of the logistic function > > > > y = a

[R] How to add specific column to data.set?

2012-04-17 Thread phillip03
Hi I have a data.set with 7 lists, with over 7000 observations in each list. to of the lists contain country names. like: aus dnk fra aus usa aut itlusa . . . etc. My dilemma is that I want to add an extra column/list to my data.set. If the countries are both european it should be assi

Re: [R] puzzling Date math result

2012-04-17 Thread R. Michael Weylandt
A slightly quieter response: Please use dput() to create a reproducible example -- for this case, if x and y aren't too long, it seems that dput(x) and dput(y) would comprise one. str() helps (and thank you for that -- it gave me a place to start), but it doesn't provide quite enough to reproduce

Re: [R] How to add specific column to data.set?

2012-04-17 Thread R. Michael Weylandt
Do you have lists or something like a data.frame? Your printout suggests you don't actually have a list. (well, data.frames really are lists but let's just not talk about that) Perhaps %in% is what you are looking for... EU <- c("UK","FR","DE") # Yes, I know there are more countries <- c("US

Re: [R] How to create a data.frame from several time series?

2012-04-17 Thread R. Michael Weylandt
It's a rather risky idea to call your function aggregate.zoo -- that's actually a pre-existing function and it could (will!) confuse the method dispatch system. In short, S3 methods use the name convention generic.class (e.g., aggregate is the generic and zoo is the class) so when you just use ag

Re: [R] What functions are available for Quadratically Constrained Quadratic Programming in R?

2012-04-17 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Michael > Sent: Tuesday, April 17, 2012 9:31 AM > To: r-help > Subject: Re: [R] What functions are available for Quadratically > Constrained Quadratic Programming in R? > > Looks

[R] Cummerbund differential expression data analysis package issue

2012-04-17 Thread craigledee
Hi all, I'm having the same issue as in this previous post: http://r.789695.n4.nabble.com/R-error-td4200447.html#a4209042 And as another user of Biostar: http://www.biostars.org/post/show/42562/cummerbund-isnt-managing-cuffdiff-database/#42895 Whereby I'm trying to output cuffdiff data into cumm

[R] ANOVA Data Error

2012-04-17 Thread MatthewJudd
Hello I am having some trouble performing a simple ANOVA in R I am working with 2001 census tract information regarding religion. I am quite a rookie at this whole R experiance, but I would like to improve my skills. *I read in my data and subset it accordingly to select only the columns I desir

Re: [R] How to add specific column to data.set?

2012-04-17 Thread phillip03
Hi Michael Sorry it is a data frame where to of the columns are 22 countries arranged in random. I now want to add and ekstra column that is 1 if the country par for the specific row is both european countries and 0 if not. Regards -- View this message in context: http://r.789695.n4.nabble.com/

Re: [R] ANOVA Data Error

2012-04-17 Thread David Winsemius
On Apr 17, 2012, at 1:03 PM, MatthewJudd wrote: Hello I am having some trouble performing a simple ANOVA in R I am working with 2001 census tract information regarding religion. I am quite a rookie at this whole R experiance, but I would like to improve my skills. *I read in my data and

Re: [R] Cummerbund differential expression data analysis package issue

2012-04-17 Thread Martin Morgan
On 04/17/2012 10:02 AM, craigledee wrote: Hi all, I'm having the same issue as in this previous post: http://r.789695.n4.nabble.com/R-error-td4200447.html#a4209042 And as another user of Biostar: http://www.biostars.org/post/show/42562/cummerbund-isnt-managing-cuffdiff-database/#42895 Whereby

Re: [R] How to add specific column to data.set?

2012-04-17 Thread R. Michael Weylandt
Reproducible example not provided... try this -- it should generalize to multiple columns: EU <- c("UK","FR","DE") # Yes, I know there are more countries <- data.frame( country1 = c("US","CH","UK","AU"), country2 = c( "CA", "MX", "FR", "DE"), stringsAsFactors = FALSE) cbind(countries, EU.Memb

Re: [R] How to add specific column to data.set?

2012-04-17 Thread David Winsemius
On Apr 17, 2012, at 1:55 PM, R. Michael Weylandt wrote: Reproducible example not provided... try this -- it should generalize to multiple columns: EU <- c("UK","FR","DE") # Yes, I know there are more countries <- data.frame( country1 = c("US","CH","UK","AU"), country2 = c( "CA", "MX", "FR"

[R] parallel processing with multiple directories

2012-04-17 Thread David Schaefer
Hello, I would like to run some code in parallel with each cluster reading/writing to a different working directory. I've tried the following code without success. The error I get is: "Error in setwd(x) : cannot change working directory" library(parallel) dirs <- list("out1","out2","out3") #

Re: [R] Cummerbund differential expression data analysis package issue

2012-04-17 Thread craigledee
I'll give it a bash, thanks! Craig -- View this message in context: http://r.789695.n4.nabble.com/Cummerbund-differential-expression-data-analysis-package-issue-tp4565409p4565611.html Sent from the R help mailing list archive at Nabble.com. __ R-help@

[R] simple time series plot

2012-04-17 Thread phibo
I'm an absolute R newbie, but my question is (or at least seems) simple: I have a number of sensor values from different sensors, along with timestamps, so something like this: sensor 1: read_at:1 2 4 5 6 value:1 15 815 23 sensor 2: read_at:23 4

Re: [R] parallel processing with multiple directories

2012-04-17 Thread Petr Savicky
On Tue, Apr 17, 2012 at 11:06:05AM -0700, David Schaefer wrote: > Hello, > > I would like to run some code in parallel with each cluster reading/writing > to a different working directory. I've tried the following code without > success. The error I get is: "Error in setwd(x) : cannot change wo

Re: [R] simple time series plot

2012-04-17 Thread David Winsemius
On Apr 17, 2012, at 2:04 PM, phibo wrote: I'm an absolute R newbie, but my question is (or at least seems) simple: I have a number of sensor values from different sensors, along with timestamps, so something like this: sensor 1: read_at:1 2 4 5 6 value:1 15

Re: [R] some questions about sympy (that is, rSymPy)

2012-04-17 Thread Kjetil Halvorsen
see below! On Sat, Apr 14, 2012 at 4:05 PM, Gabor Grothendieck wrote: > On Fri, Apr 13, 2012 at 9:50 PM, Kjetil Halvorsen > wrote: >> I am experimenting with rSymPy, and it seems to work nice. >> >> >> However, I dislike the need to wrap all sympy expressions within >> quotes, it leads to ugly c

Re: [R] parallel processing with multiple directories

2012-04-17 Thread Martin Morgan
On 04/17/2012 11:06 AM, David Schaefer wrote: Hello, I would like to run some code in parallel with each cluster reading/writing to a different working directory. I've tried the following code without success. The error I get is: "Error in setwd(x) : cannot change working directory" library(

Re: [R] some questions about sympy (that is, rSymPy)

2012-04-17 Thread Gabor Grothendieck
On Tue, Apr 17, 2012 at 4:00 PM, Kjetil Halvorsen wrote: > see below! > > On Sat, Apr 14, 2012 at 4:05 PM, Gabor Grothendieck > wrote: >> On Fri, Apr 13, 2012 at 9:50 PM, Kjetil Halvorsen >> wrote: >>> I am experimenting with rSymPy, and it seems to work nice. >>> >>> >>> However, I dislike the

[R] Sweave problem after R update version

2012-04-17 Thread Riccardo Romoli
I would notice this error compiling a Sweave document after I updated R from version 2.14.2 to 2.15.0: Error in driver$finish(drobj) : the output file 'MyDocument.tex' has disappeared Calls: -> do.call -> -> Execution halted Do you have any suggestion? Regards Riccardo Sent from iPod

Re: [R] Can a matrix have 'list' as rows/columns?

2012-04-17 Thread Worik R
On Tue, Apr 17, 2012 at 11:52 PM, David Winsemius wrote: > > On Apr 17, 2012, at 12:13 AM, Worik R wrote: > > After a lot of processing I get a matrix into M. I expected each row and >> column to be a vector. But it is a list. >> > > This behavior is not the result of limitation in how R's sapp

Re: [R] Sweave problem after R update version

2012-04-17 Thread Duncan Murdoch
On 12-04-17 5:35 PM, Riccardo Romoli wrote: I would notice this error compiling a Sweave document after I updated R from version 2.14.2 to 2.15.0: Error in driver$finish(drobj) : the output file 'MyDocument.tex' has disappeared Calls: -> do.call ->-> Execution halted Do you have any

[R] random effects using lmer

2012-04-17 Thread HughSt
Hi, I am trying to run a logistic regression to look at the risk of malaria infection in individuals. I want to account for intra household correlation and so want to include a household level random effect. I have been using the lmer command in lme4 package but am getting some strange results tha

[R] Method=df for coxph in survival package

2012-04-17 Thread David Parker
I've been following the example in the R help page: http://stat.ethz.ch/R-manual/R-devel/library/survival/html/frailty.html library(survival); coxph(Surv(time, status) ~ age + frailty(inst, df=4), lung) Here, in this particular example they fixed the degrees of freedom for the random institutio

[R] Manually reconstructing arima model from coefficients

2012-04-17 Thread sergey777
Colleagues I am a new to R but already love it. I have the following problem: I fitted arima model to my time series like this (please ignore modeling parameters as they are not important now): x = scan("C:/data.txt") x = ts(x, start=1, frequency=1) x.fit<-arima(x, order = c(1,0,0), seasonal = l

[R] Error with Rcmd check library --as-cran

2012-04-17 Thread David Bapst
Hello all, I was checking the newest update of my library before submitting it to CRAN, using R 2.15.0 and Rtools for Windows 215 using Rcmd in the Command Prompt, on my x64 Windows7 laptop. I recently heard that for checking packages for CRAN submission one should use the option --as-cran; previo

Re: [R] Sum part of row and add this as a new column vector

2012-04-17 Thread Rui Barradas
Hello, Try df1 <- read.table(text=" County 1990 1991 1992 1993 Alachua 1 1 1 1 Baker 0 0 0 0 Bay 0 0 1 0 Bradford 0 0 0 0 ", header=TRUE) df1$Total <- rowSums(df1[ , -1]) # Not column 1 df1$Total <- rowSums(df1[ , 2:5])# Explicit column numbers Hope this helps, Rui Barradas -- View this messa

Re: [R] Can a matrix have 'list' as rows/columns?

2012-04-17 Thread David Winsemius
On Apr 17, 2012, at 7:27 PM, Worik R wrote: On Tue, Apr 17, 2012 at 11:52 PM, David Winsemius >wrote: On Apr 17, 2012, at 12:13 AM, Worik R wrote: After a lot of processing I get a matrix into M. I expected each row and column to be a vector. But it is a list. This behavior is not t

Re: [R] Manually reconstructing arima model from coefficients

2012-04-17 Thread R. Michael Weylandt
What exactly do you mean by "apply" it to a different data set? Unlike regular regressions, time series models don't (generally) use new data to make forecasts ... By the way, this is a good guide to the time series functionality available in R: http://cran.r-project.org/web/views/TimeSeries.html

Re: [R] Error with Rcmd check library --as-cran

2012-04-17 Thread Henrik Bengtsson
paleotree imports phangorn which depends on Matrix, so your example does indeed depend on Matrix. A possible reason is that your installed Matrix was built for a different version of R, i.e. check packageDescription("Matrix"). /Henrik On Tue, Apr 17, 2012 at 4:23 PM, David Bapst wrote: > Hello

Re: [R] How to add specific column to data.set?

2012-04-17 Thread phillip03
This is the first and last part of my data frame. There is 3465 (not 7000) observations so the "1 or 0" column has to be 3465 rows long aswell year country1 country2 contig comlangpop1gdp1 pop2 gdp2 rtadist avgflow 11992 AUS AUT 0

[R] Error in eval when using contrast and nlme

2012-04-17 Thread Connolly, Colm
Hi everybody, I've written a function to run an LME model on data derived from functional magnetic resonance images. When I run the function with contrasts included I get the following error Error in eval(expr, envir, enclos) : object 'inModelFormula' not found I think it has something do do

Re: [R] Error with Rcmd check library --as-cran

2012-04-17 Thread David Winsemius
On Apr 17, 2012, at 9:15 PM, Henrik Bengtsson wrote: paleotree imports phangorn which depends on Matrix, so your example does indeed depend on Matrix. A possible reason is that your installed Matrix was built for a different version of R, i.e. check packageDescription("Matrix"). I thought Ma

Re: [R] How to add specific column to data.set?

2012-04-17 Thread R. Michael Weylandt
Ok, so you simply need to use the methods David or I provided -- it looks like you don't even have to change the variable names... Is there something that isn't clear now? Also, reproducible examples are much better if you use dput() so they are actually reproducible Michael On Tue, Apr 17,

Re: [R] Error with Rcmd check library --as-cran

2012-04-17 Thread Duncan Murdoch
On 12-04-17 9:21 PM, David Winsemius wrote: On Apr 17, 2012, at 9:15 PM, Henrik Bengtsson wrote: paleotree imports phangorn which depends on Matrix, so your example does indeed depend on Matrix. A possible reason is that your installed Matrix was built for a different version of R, i.e. check

Re: [R] puzzling Date math result

2012-04-17 Thread Chabot, Denis
Thank you both to Michael and Calum, Your comments pointed me to the answer. I did not succeed in making a useful reproducible example using dput(), so I'll have to study that command further. But it is no longer necessary for this thread to have a successful end. Your comments about floating

Re: [R] Manually reconstructing arima model from coefficients

2012-04-17 Thread Sergey Samsonov
Michael My final goal is to perform forecasting in real time. My historical data that is used for training consist of about 2000 samples. Fitting ARIMA model x.fit<-arima(x, order = c(5,0,0), seasonal = list(order=c(0,0,1))) takes about 3-5 minutes, often I do not have so much time between rece

[R] introducing R to high school students

2012-04-17 Thread Christopher W Ryan
I participate peripherally on a listserve for middle- and high-school science teachers. Sometimes questions about graphing or data analysis come up. I never miss an opportunity to advocate for R. However, the teachers are often skeptical that their students would be able to issue commands or write

Re: [R] introducing R to high school students

2012-04-17 Thread R. Michael Weylandt
In addition to whatever feedback you may get here, you might subscribe to the SIG-Teaching list for another interested population. Michael On Tue, Apr 17, 2012 at 10:46 PM, Christopher W Ryan wrote: > I participate peripherally on a listserve for middle- and high-school > science teachers. Somet

Re: [R] Can a matrix have 'list' as rows/columns?

2012-04-17 Thread William Dunlap
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf > Of Worik R > Sent: Tuesday, April 17, 2012 4:28 PM > To: r-help > Subject: Re: [R] Can a matrix have 'list' as rows/columns? > > On Tue, Apr 17, 2012 at 11:52 PM, David Winsemius > wrote: > > > > > On Apr 1

Re: [R] introducing R to high school students

2012-04-17 Thread Indrajit Sengupta
Hi Chris,   I am not sure, whether introducing R to High School students would be a good idea as I feel we should encourage students to sketch the graphs in paper to get their concepts right. Excel is fine, but - if I write an equation on the board, will the student be able to visualize its grap

Re: [R] introducing R to high school students

2012-04-17 Thread Richard M. Heiberger
Christopher, I suggest that you look at R through Excel. This is a Springer book that Erich Neuwirth and I wrote. It is designed as a computational supplement to any introductory Statistics book. It uses Erich's RExcel to give either menu access to R from Excel (using Rcmdr embedded into the Ex

[R] How to keep spacing in column name while reading data from data frame?

2012-04-17 Thread Manish Gupta
Hi, I am working on dataframe and column names are multiwords but when i read it it become one word with space relplaced by "." How can i keep normall spacing reading file. for e.g. input file Data Test Data Out 35 54 But when i read t

Re: [R] Error with Rcmd check library --as-cran

2012-04-17 Thread David Bapst
Hi all- Henrik, packageDescription informs me that I have Matrix version 1.0-6, which is the newest version on CRAN. Duncan, I installed R-patched from CRAN, reset my path variable, reinstalled paleotree's dependencies and reran Rcmd check with --as-cran. This produced a related but different err

[R] How to change color of bar based on y value of y axis?

2012-04-17 Thread Manish Gupta
Hi, I m working on bar chart. *Input file:* index -5 1 index -4 3 index -3 2 index -2 10 index -1 7 index 0 2 index 1 1 barplot(t(as.matrix(i[3])), ylab= "value", main = "testdata", beside=TRUE, col=c("burlywood1"),horiz=TRUE,cex.names=0.8,na

Re: [R] introducing R to high school students

2012-04-17 Thread Gabor Grothendieck
On Tue, Apr 17, 2012 at 10:46 PM, Christopher W Ryan wrote: > I participate peripherally on a listserve for middle- and high-school > science teachers. Sometimes questions about graphing or data analysis > come up. I never miss an opportunity to advocate for R. However, the > teachers are often sk

Re: [R] How to change color of bar based on y value of y axis?

2012-04-17 Thread Petr PIKAL
Hi > > Hi, > > > I m working on bar chart. > > *Input file:* > index -5 1 > index -4 3 > index -3 2 > index -2 10 > index -1 7 > index 0 2 > index 1 1 > > barplot(t(as.matrix(i[3])), ylab= "value", main = "testdata", beside=TRUE, > col=c("burlywood1"),horiz=TRU

Re: [R] How to keep spacing in column name while reading data from data frame?

2012-04-17 Thread Petr PIKAL
Hi > > Hi, > > I am working on dataframe and column names are multiwords but when i read > it it become one word with space relplaced by "." How can i keep normall > spacing reading file. > > for e.g. > > input file > > Data Test Data Out > 35 > 5

Re: [R] Can a matrix have 'list' as rows/columns?

2012-04-17 Thread Bert Gunter
Not sure this adds to, subtracts from, or obfuscates this thread, but ... > x <- list(a=1:3,b = log, c=letters[2],d=as.list(1:5)) > is.vector(x) [1] TRUE > dim(x) <- c(2,2) > is.matrix(x) [1] TRUE > is.vector(x) [1] FALSE > x [,1] [,2] [1,] Integer,3 "b" [2,] ? List,5 > x[2

Re: [R] introducing R to high school students

2012-04-17 Thread Bert Gunter
<...snipped> >> I anticipate keeping things very simple: >> --objects and the fact that there is stuff inside them. str(), head(), tail() >> --how to get data into R >> --dataframes, as I imagine they will mostly be using single, >> "rectangular" datasets >> --a lot of graphics (I can't imagine th

Re: [R] How to add specific column to data.set?

2012-04-17 Thread phillip03
Wow it works :) Thank you SO much!! I am very new at R and was thinking if you would explain what these to codes do: countries<-data.frame(country1,country2,stringsAsFactors=FALSE) # I know this i a vector with both my county lists but what does stringsAsFacors= FALSE do ?. What if I wantede a

[R] Help in Anderson-Darling Normality test

2012-04-17 Thread arunkumar1111
Hi I'm using the Anderson Darling Normality test in my modelling. I'm finding the Normality test for residuals. if the values of residuals are very high the p-value coming out is infinity. how to interpret this. or is there any means of calculating the normality test - Thanks in Advance