Re: [R] loading saved files with objects in same names

2014-08-18 Thread Jinsong Zhao
On 2014/8/18 19:20, William Dunlap wrote: Have you tried the 'envir' argument to load()? E.g., envA <- new.environment() load("A.RData", envir=envA) envB <- new.environment() load("B.RData", envir=envB) plot(A$object, B$object) Bill Dunlap TIBCO Software wdunlap tibco.com

[R] programme bivariate binomial negative

2014-08-18 Thread Untung Kurniawan
I'm making a thesis with bonimial negative bivariate regression, please help me to be delivered program. thank you. __ 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.o

Re: [R] loading saved files with objects in same names

2014-08-18 Thread William Dunlap
Rolf, Yes, I meant to write envA$object, etc, but did not read it twice before running off to dinner. Thanks. Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Aug 18, 2014 at 7:52 PM, Rolf Turner wrote: > On 19/08/14 14:20, William Dunlap wrote: >> >> Have you tried the 'envir' argument

Re: [R] loading saved files with objects in same names

2014-08-18 Thread Rolf Turner
On 19/08/14 14:20, William Dunlap wrote: Have you tried the 'envir' argument to load()? E.g., envA <- new.environment() load("A.RData", envir=envA) envB <- new.environment() load("B.RData", envir=envB) plot(A$object, B$object) Did you mean plot(envA$object, envB$obje

Re: [R] loading saved files with objects in same names

2014-08-18 Thread William Dunlap
Have you tried the 'envir' argument to load()? E.g., envA <- new.environment() load("A.RData", envir=envA) envB <- new.environment() load("B.RData", envir=envB) plot(A$object, B$object) Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Aug 18, 2014 at 5:30 PM, Jinsong Zhao wr

Re: [R] Building and scoring multiple models with dplyr functions

2014-08-18 Thread Ista Zahn
At the risk of being old-fashioned, I suggest doing this in a for-loop. Why struggle to fit this into the dplyr framework when a straight-forward loop will do the trick? This is untested in the absence of example data, but something along the lines of models <- list() predictions <- list() for(g

Re: [R] principle component values on PCA plots do not match

2014-08-18 Thread Jinsong Zhao
Hi, There is a scale factor associated with biplot when plotting the PCA result. Please read the help page of biplot.princomp or/and the source code of this function. HIH, Jinsong On 2014/8/18 16:31, John Romansic wrote: Hi all, I am using prcomp to do Principle Components Analysis and hav

[R] loading saved files with objects in same names

2014-08-18 Thread Jinsong Zhao
Hi there, I have several saved data files (e.g., A.RData, B.RData and C.RData). In each file, there are some objects with same names but different contents. Now, I need to compare those objects through plotting. However, I can't find a way to load them into a workspace. The only thing I can d

[R] principle component values on PCA plots do not match

2014-08-18 Thread John Romansic
Hi all, I am using prcomp to do Principle Components Analysis and have run into a problem regarding the scale of the axes on my plots. I am using prcomp to analyze a set of 25 morphological measurements taken on each of 161 individual frogs. I used the biplot function to produce a figure of PC1 v

[R] Building and scoring multiple models with dplyr functions

2014-08-18 Thread Andrew Agrimson
Hello All, I have a question regarding building multiple models and then scoring new data with these models. I have been tasked with converting existing SAS modeling code into equivalent R code, but unfortunately I rarely use R so I'm in unfamiliar territory. I've think I've found a good way to bu

Re: [R] Prediction intervals (i.e. not CI of the fit) for monotonic loess curve using bootstrapping

2014-08-18 Thread David Winsemius
I had that result sometimes when testing as well. You don't offer any code so there's nothing I can do to follow-up. -- David. On Aug 18, 2014, at 4:56 AM, Jan Stanstrup wrote: > The knots are deleted anyway ("Deleting unnecessary knots ..."). It seems to > make no difference. > > > > On 08

Re: [R] About radial.labels in plotrix

2014-08-18 Thread Duncan Murdoch
On 18/08/2014 1:00 PM, Hugues François wrote: Really sorry for this mistake... I have several graph to do for different weather station and mylim and sta are elements to loop on each one. For the example, the code should be the one below. Sometimes I feel dumb since I have read the "pretty" th

Re: [R] About radial.labels in plotrix

2014-08-18 Thread Hugues François
Really sorry for this mistake... I have several graph to do for different weather station and mylim and sta are elements to loop on each one. For the example, the code should be the one below. Sometimes I feel dumb since I have read the "pretty" thing but I didn't understand the syntax "pretty(

Re: [R] About radial.labels in plotrix

2014-08-18 Thread Duncan Murdoch
On 18/08/2014 12:25 PM, Hugues François wrote: Hello, Thanks for your answer. Of course I read the help but I didn't understand how to retrieve data from radial.lim. Maybe it is trivial for you but not for me. Attached to this message you will find some test data but you will need to cast them

Re: [R] About radial.labels in plotrix

2014-08-18 Thread Hugues François
Hello, Thanks for your answer. Of course I read the help but I didn't understand how to retrieve data from radial.lim. Maybe it is trivial for you but not for me. Attached to this message you will find some test data but you will need to cast them using reshape and this line (assuming you impor

Re: [R] GSUB function and regex problem

2014-08-18 Thread Rui Barradas
Hello, Try reading your data with option stringsAsFactors = FALSE. It seems that your strings are being read as factors, which are coded as integers. DataGoogle1 <- read.csv(file = "DataGoogle2.csv", header = T, stringsAsFactors = FALSE) Hope this helps, Rui Barradas Em 18-08-2014 10:13,

Re: [R] GSUB function and regex problem

2014-08-18 Thread William Dunlap
gsub will work on a column of a data.frame, not an entire data.frame. > gsub(pattern = "facebook-Ads1", "FBAds", DataGoogle1$Campaña) [1] "FBAds" "faceBOOK-Ads1" "fcebook-ads12" "Email1" "mail1" [6] "referral1" Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Aug 18, 2014 at 2:13 AM,

Re: [R] About radial.labels in plotrix

2014-08-18 Thread Duncan Murdoch
On 18/08/2014 9:35 AM, Hugues François wrote: Hello, As you can read in the small code below, I do not represent directly my data but its inverse in the limits of my radial plot and I would like to reorder grid labelling from the upper value at the center and the lower one at the graph's

Re: [R] Turn Rank Ordering Into Numerical Scores By Transposing A Data Frame

2014-08-18 Thread David L Carlson
Another approach using reshape2: > library(reshape2) > # Construct data/ add column of row numbers > set.seed(42) > mydf <- data.frame(t(replicate(100, sample(c("red", "blue", + "green", "yellow", NA), 4 > mydf <- data.frame(rows=1:100, mydf) > colnames(mydf) <- c("row", "rank1", "rank2", "r

[R] About radial.labels in plotrix

2014-08-18 Thread Hugues François
Hello, As you can read in the small code below, I do not represent directly my data but its inverse in the limits of my radial plot and I would like to reorder grid labelling from the upper value at the center and the lower one at the graph's border. In my example I would like to have 40 at

[R] GSUB function and regex problem

2014-08-18 Thread Omar André Gonzáles Díaz
Hi all, i have this data.frame with 3 columns: "campaña", "visitas", "compras". This is the actual data.frame: Campaña Visitas Compras 1 facebook-Ads1 524 2 2 faceBOOK-Ads1 487 24 3 fcebook-ads12258 4 4

Re: [R] Prediction intervals (i.e. not CI of the fit) for monotonic loess curve using bootstrapping

2014-08-18 Thread Jan Stanstrup
The knots are deleted anyway ("Deleting unnecessary knots ..."). It seems to make no difference. On 08/14/2014 06:06 PM, David Winsemius wrote: On Aug 14, 2014, at 7:17 AM, Jan Stanstrup wrote: Thank you very much for this snippet! I used it on my data and indeed it does give intervals wh

Re: [R] filled.contour key axis

2014-08-18 Thread Jim Lemon
On Mon, 18 Aug 2014 08:51:57 AM Lietz, Haiko wrote: > Hi all, > > Using filled.contour... > > foo <- matrix(seq(0.1, 0.9, 0.1), ncol = 3) > filled.contour(foo) > > how can I set the key axis to give percentages? > > And is there a way to automatically label the key axis except for placing > te

[R] filled.contour key axis

2014-08-18 Thread Lietz, Haiko
Hi all, Using filled.contour... foo <- matrix(seq(0.1, 0.9, 0.1), ncol = 3) filled.contour(foo) how can I set the key axis to give percentages? And is there a way to automatically label the key axis except for placing text there? Thanks Haiko Haiko Lietz GESIS - Leibniz Institute for the S