Re: [R] question about lines

2013-09-19 Thread meng
Ok,many thanks for your detailed answer. At 2013-09-18 19:20:26,Duncan Murdoch murdoch.dun...@gmail.com wrote: On 13-09-18 1:38 AM, meng wrote: Oh,yes, I found out this according to your reply.Thanks. As to time series analysis, in order to show the effect of smoothing or filtering,the

Re: [R] Download data

2013-09-19 Thread jcrosbie
Thank you for all your help. I'm still not able to figure out how automate downloads from online websites. This is a daily function to download the needed data. I would also like to be able to do this on other websites such as:

Re: [R] cov2cor exp

2013-09-19 Thread Pascal Oettli
Hello, Asking help for homework is prohibited on this list. Regards, Pascal 2013/9/19 Guy Wachsman guy.wachsm...@duke.edu Hi Pascal, The first reason is that it was a homework assignment, the second it that this function is based on the algebraic equation for correlation matrix (given

[R] glmer vs glmmadmb

2013-09-19 Thread kenny xu
Dear All I have fitted the following glmm: cmai ~ time.f * intrv.f + (1 | nhome.f/Res_Code.f) with poisson distribution, using both glmer and glmmadmb. But the estimation for the fixed and random effects were different, i.e. summary(lmer.AGGREG.cmai.out3) Call: glmmadmb(formula =

[R] How do I ensure that the polygon in spatstat::owin(poly=polygon) does not have “negative area”

2013-09-19 Thread Jeff Marcus
I am a new user of the R spatstat package and am having problems creating a polygonal observation window with owin(). Code follows: library(maps) library (sp)` library(spatstat) mass.map - map(state, massachusetts:main, fill=T) # This returns a data frame includding x and y components that form a

[R] How do I ensure that the polygon in spatstat::owin(poly=polygon) does not have “negative area”

2013-09-19 Thread Jeff Marcus
I am a new user of the R spatstat package and am having problems creating a polygonal observation window with owin(). Code follows: library(maps) library (sp)` library(spatstat) mass.map - map(state, massachusetts:main, fill=T) # This returns a data frame includding x and y components that form a

[R] ggplot2: two y-axis - any change?

2013-09-19 Thread Anna Zakrisson Braeunlich
Hi, I know that according to plot theory, one should not have two y-axis. It is just that in my field, we are often depending on plots where water depth is plotted in one y-axis and other parameters such as salinity on the other y-axis to see where the halocline (the depth where the two

[R] callNextMethod with dots argument

2013-09-19 Thread Kiên Kiêu
Hi, I met a problem when invoking callNextMethod within a method associated with a generic function taking ... as an argument. Here is the code setClass(Aparent,representation(x=numeric,y=numeric)) setClass(Achild,contains=Aparent) setGeneric(do,def=function(a,...) standardGeneric(do))

Re: [R] can you explain the cov2cor function

2013-09-19 Thread Kenn Konstabel
On Wed, Sep 18, 2013 at 12:14 PM, Pascal Oettli kri...@ymail.com wrote: It's a function of package sos, quite useful to find functions in R. It is interesting to note that neither RSiteSearch(cov2cor) nor findFn(cov2cor) seem to be able to find cov2cor (from the stats package! so it's there

Re: [R] v3.0.1 issue

2013-09-19 Thread Jannis
I only guess, but this message may hint to the cause: [Previously saved workspace restored] R automatically starts some .RData files with images of the workspaces you used before. Try to start R with the --no-restore argument (R --no-restore in the command line or added to the properties of

Re: [R] callNextMethod with dots argument

2013-09-19 Thread Simon Zehnder
Kien, if you want to add variables in a function definition that is predefined by a Generic and calls CallNextMethod you have to add the '…' argument as well. setMethod(do,signature(a=Achild), function(a,msg,...) { print(do Achild) callNextMethod()

Re: [R] Non-ACSII characters in R on Windows

2013-09-19 Thread Duncan Murdoch
On 13-09-19 5:06 AM, Maxim Linchits wrote: Have any of the thread participants sent a bug report to R? If not, let me know if you intend to so so. Otherwise, I'll send a report myself. There's no bug, as far as I know. The issue is that various functions (by design) convert strings to the

Re: [R] why does system() truncates stdout output from large files? (SOLUTION)

2013-09-19 Thread Andrew Beckerman
Dear all - Should anyone be interested - using paste(system(paste(awk 'NR==2', file.genepop), intern = TRUE), collapse=) pulls together the pieces (list elements) of the returned values. -- Andrew Beckerman University of Sheffield On Tuesday, 17 September 2013 at 12:36, Andrew

Re: [R] Replacement function using grouping variable

2013-09-19 Thread PIKAL Petr
Hi -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Alecia M Moser Sent: Thursday, September 19, 2013 7:01 AM To: r-help@r-project.org Subject: [R] Replacement function using grouping variable Hello - I am looking for a

Re: [R] v3.0.1 issue

2013-09-19 Thread PIKAL Petr
Hi or install missing packages to new R version before starting R with workspace. Regards Petr -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Jannis Sent: Thursday, September 19, 2013 11:29 AM To: r-help@r-project.org Cc:

Re: [R] glmer vs glmmadmb

2013-09-19 Thread Ben Bolker
kenny xu kennyxu1983 at hotmail.com writes: Dear All I have fitted the following glmm: cmai ~ time.f * intrv.f + (1 | nhome.f/Res_Code.f) with poisson distribution, using both glmer and glmmadmb. But the estimation for the fixed and random effects were different, i.e. This is a

Re: [R] ggplot: stat_smooth(method='glm', ...) - plot linear predictor?

2013-09-19 Thread Michael Friendly
Thanks for the very helpful reply. Some comments inline. On 9/18/2013 8:53 PM, Dennis Murphy wrote: Hi Michael: Some questions: - Is it possible, and if so, how, to plot the same data and fitted smooths on the logit scale, i.e., the linear predictor for the binomial glm? Yes, but not

Re: [R] How do I ensure that the polygon in spatstat::owin(poly=polygon) does not have ³negative area²

2013-09-19 Thread MacQueen, Don
I suggest taking this question to r-sig-geo, if you haven't already. -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 9/18/13 9:07 PM, Jeff Marcus jeff.n.mar...@gmail.com wrote: I am a new user of the R spatstat package

Re: [R] binary symmetric matrix combination

2013-09-19 Thread arun
Hi Elio, Try this: library(stringr)  lines1-str_trim(gsub(\t, ,readLines(elio.txt)))  lst1-lapply(split(lines1,cumsum(lines2==)),function(x) x[x!=]) lst2- lapply(lst1[lapply(lst1,length)0],function(x) as.matrix(read.table(text=x,row.names=1))) names(lst2)- paste0(m,seq_along(lst2)) lst2[1:2]

[R] Warning in gamlss function centiles.pred

2013-09-19 Thread rwnahhas
Hello, I am getting a warning message in GAMLSS and have not been able to figure out what the problem is, or if it is something I should be concerned about. I fit the following 4 models and find that fit2.bcpe is the one with the lowest AIC fit1.bcpe = gamlss(y~pb(x),

Re: [R] ggplot: stat_smooth(method='glm', ...) - plot linear predictor?

2013-09-19 Thread Ista Zahn
You need to map obs to the y axis: p + geom_point(aes(y=obs), position=position_jitter(height=0.02, width=0)) Best, Ista On Thu, Sep 19, 2013 at 9:19 AM, Michael Friendly frien...@yorku.ca wrote: Thanks for the very helpful reply. Some comments inline. On 9/18/2013 8:53 PM, Dennis Murphy

Re: [R] can you explain the cov2cor function

2013-09-19 Thread David Winsemius
On Sep 19, 2013, at 1:48 AM, Kenn Konstabel wrote: On Wed, Sep 18, 2013 at 12:14 PM, Pascal Oettli kri...@ymail.com wrote: It's a function of package sos, quite useful to find functions in R. It is interesting to note that neither RSiteSearch(cov2cor) nor findFn(cov2cor) seem to be

Re: [R] Dose-response relationship using metafor?

2013-09-19 Thread Viechtbauer Wolfgang (STAT)
Can you provide a minimal and self-contained example showing/illustrating what you have done and would like to test? Based on the information provided, I could only make a vague suggestion along the lines of: You could include dose in an appropriate meta-regression model and then examine

[R] making a wider, shorter, 4-column table instead of the narrower, longer, 2-column table I get with tm, Hmisc, and Sweave

2013-09-19 Thread Christopher W. Ryan
I think my question sort of straddles two mailing lists, texhax and r-help. Response so far on texhax has been scant. Using the tm package, I am tabulating the frequencies of words used by respondents to several survey questions. I use Sweave and the Hmisc latex() command to produce the output

[R] lattice: double y - problem changing axis color after doubleYScale

2013-09-19 Thread Anna Zakrisson Braeunlich
Hi, I have had some troubles using doubleYScale. No matter what I try, I cant manage to change the color of the y-axis in the end. I have to produce a black and white plot. There is also something I do not understand regarding fontfamilyj=serif when using it in: strip=strip.custom() Maybe

[R] CRAN mirror for R in India: new one at WBUT, how do we get listed in the CRAN website?

2013-09-19 Thread abhinav kashyap
[[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained,

[R] SAR: nonlinear and linear mixed model comparison using mmSAR - package

2013-09-19 Thread Bernd Lenzner
Hello, I have a problem trying to compare model-fit between linear and non-linear mixed models. I am using the mmSAR-package from Guilhaumon (Version 1.0) to fit different models (power, exponential, lomolino, weibull etc.) to my data. Besides that I am as well fitting a linear model to the

[R] (no subject)

2013-09-19 Thread tony toca
Dear R sages, I used the function rbind to combine a matrix (M) and a vector (Fert) to get a new matrix (A). This was fine. The issue is however, that the new matrix A has as its row names the name of the vector Fert, even though I set teh new vector A to have dimnames=NULL. See short code below

Re: [R] (no subject)

2013-09-19 Thread arun
Hi, You don't even need as.matrix() in this case:  A- rbind(M,Fert) is.matrix(A) #[1] TRUE  dimnames(A)- list(NULL,NULL) A.K. - Original Message - From: arun smartpink...@yahoo.com To: tony toca meddee1...@gmail.com Cc: R help r-help@r-project.org Sent: Thursday, September 19, 2013 5:18

[R] Fitting some data to a two-exponential expression

2013-09-19 Thread Espen Hagen Blokkdal
Hi, I have some data that should fit to a two-exponential expression, so that I/I[1] = a1*exp(-k1*x) + a2*exp(-k2*x) where I have scaled by the initial value of the signal, so that a1 + a2 =1. Using the nls-function, the nls bit of the code looks like

Re: [R] binary symmetric matrix combination

2013-09-19 Thread supernovartis
Hi Arun, Worked perfectly, one last question how to read the matrices which have the dollar sign? Thanks again. On Thu, Sep 19, 2013 at 3:46 PM, arun kirshna [via R] ml-node+s789695n4676510...@n4.nabble.com wrote: Hi Elio, Try this: library(stringr) lines1-str_trim(gsub(\t,

Re: [R] (no subject)

2013-09-19 Thread arun
Hi, You can either use: A-as.matrix(rbind(M,Fert)) dimnames(A)- list(NULL,NULL)  A # [,1] [,2] [,3] #[1,]  0.3  0.0    0 #[2,]  0.0  0.5    0 #[3,]  0.0  1.0    5 #or matrix(rbind(M,Fert),3,3) A.K.   - Original Message - From: tony toca meddee1...@gmail.com To:

Re: [R] R-3.0.1 g77 errors

2013-09-19 Thread Prigot, Jonathan
Sadly, I am limited to the Solaris 10 system. I wish that I could use Linux, the world uses it. -- Jonathan M. Prigot jpri...@partners.org Partners Healthcare Systems On Wed, 2013-09-18 at 17:20 +0200, Simon Zehnder wrote: On my systems Linux Scientific and Mac OS X I use as well for the F77

Re: [R] How do I ensure that the polygon in spatstat::owin(poly=polygon) does not have “negative area”

2013-09-19 Thread Rolf Turner
You were nearly there. No need to muck about with the shapefile business which introduces a whole lot of sub-polygons (counties or townships I guess). The polygon for the border of Massachusetts provided in maps has its vertices in clockwise order and its first and last vertices identical

Re: [R] Polynomial of Degree 4

2013-09-19 Thread rwnahhas
Try solve.polynomial in package polynom Ramzi -- View this message in context: http://r.789695.n4.nabble.com/Polynomial-of-Degree-4-tp4676481p4676515.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] ggplot legend formatting

2013-09-19 Thread Robert Lynch
I am having trouble getting my legend to format correctly in ggplot2. A full description and pictures are in the ggplot google grouphttps://groups.google.com/forum/?hl=en#!topic/ggplot2/LSarpgmSG8k. but the short description is that in guides(fill = guide_legend(nrow = 3),bycol = TRUE) changing

Re: [R] ggplot: stat_smooth(method='glm', ...) - plot linear predictor?

2013-09-19 Thread Michael Friendly
On 19/09/2013 6:29 PM, Ista Zahn wrote: You need to map obs to the y axis: p + geom_point(aes(y=obs), position=position_jitter(height=0.02, width=0)) Great. that's the magic I was missing -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. Chair, Quantitative

[R] CRAN mirror for R in India: new one at WBUT, how do we get listed in the CRAN website?

2013-09-19 Thread Abhinav Kashyap
[[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained,

Re: [R] (no subject)

2013-09-19 Thread Richard Kwock
Hi Tony, The dimnames parameter is only in the matrix() function, not in the as.matrix() function. #So you can do: A - matrix(rbind(Fert,M), nrow = nrow(rbind(Fert,M))) A #This for example will allow you to name your row and colums. B - matrix(rbind(Fert,M), nrow = nrow(rbind(Fert,M)), dimnames

Re: [R] (no subject)

2013-09-19 Thread tony toca
Many thanks, guys. Tony On Thu, Sep 19, 2013 at 11:28 PM, Richard Kwock richardkw...@gmail.comwrote: Hi Tony, The dimnames parameter is only in the matrix() function, not in the as.matrix() function. #So you can do: A - matrix(rbind(Fert,M), nrow = nrow(rbind(Fert,M))) A #This for

[R] Need help to find out the name of my columns and rows in a data file

2013-09-19 Thread ivanc010
I've been assigned homework to analyze a file. The R package is car. The specific data file is Florida. So, I did the usual stuff: library(car) data(Florida) summary(Florida) My specific assignment is to run a t-test between GORE and BUSH. (This file has information on the 2000 election.) To

Re: [R] ggplot legend formatting

2013-09-19 Thread David Winsemius
On Sep 19, 2013, at 4:44 PM, Robert Lynch wrote: I am having trouble getting my legend to format correctly in ggplot2. A full description and pictures are in the ggplot google grouphttps://groups.google.com/forum/?hl=en#!topic/ggplot2/LSarpgmSG8k. but the short description is that in

Re: [R] Need help to find out the name of my columns and rows in a data file

2013-09-19 Thread David Winsemius
On Sep 19, 2013, at 3:59 PM, ivanc010 wrote: I've been assigned homework to analyze a file. The R package is car. The specific data file is Florida. So, I did the usual stuff: library(car) data(Florida) summary(Florida) My specific assignment is to run a t-test between GORE and BUSH.

Re: [R] CRAN mirror for R in India: new one at WBUT, how do we get listed in the CRAN website?

2013-09-19 Thread David Winsemius
From the first hit on a google search for : cran mirrors: (Which appears to be the listing to which you aspire...) If you want to host a new mirror at your institution, please have a look at the CRAN Mirror HOWTO. There is a link in the webpage. And please post in plain text to Rhelp. On

[R] Averate memory usage trend

2013-09-19 Thread mohan . radhakrishnan
Hi, I would like to understand how to draw a graph to find out the average memory used by a single httpd process given these details collected over a period of several days. I code R but this is about a method to find an average memory utilization. I believe I have enough data. How

Re: [R] Download data

2013-09-19 Thread Jeff Newmiller
I am sorry to hear that you are having difficulty, but your automation task is one that requires operating-system-specific knowledge that would be off-topic for this list, and web-scraping of forms really requires knowledge of web protocols and (in this case) Java and JavaScript that are also