Re: [R] Datamatrix in R - extracting data from scatterplot

2013-08-16 Thread David Winsemius
On Aug 15, 2013, at 11:45 AM, BoonFei Tan wrote: > Say I have a dataframe for plotting scatterplot. The dataframe would be > organized in the following fashion (in CSV format): > > name ABC EFG132 45256 67 > to, say 200 000 entries > > I am going to first do a scatterplot, after which

[R] Issue installing Packages

2013-08-16 Thread Alexandre Khelifa
Hi Guys, Hope you are doing good. I am using R (3.0.1 - 32 bits) extensively for my work but I have been having an issue for the last days. I would like to download (and update) the packages RODBC, forecast and gdata but I cannot download the binary file from the CRAN Mirrors. I have tried severa

[R] problem installing RDCOMEvents

2013-08-16 Thread Kishor Tappita
Dear R-Users, I am getting the below error when I am trying to install "RDCOMEvents" from Omegahat. All the dependencies were installed .Please help me resolve this issue. > library(RDCOMEvents) Loading required package: RDCOMServer Loading required package: SWinRegistry Attaching package: 'SWin

Re: [R] to match samples by minute

2013-08-16 Thread PIKAL Petr
Hi You will get only general answer without some example data. Se Posting Guide. If I understand correctly you need to reshape your df to have a structure unixtime, valuefactor1, valuefactor2 and after that valuefactor1-valuefactor2 shall give you desired solution. One possible way is to split

Re: [R] to match samples by minute

2013-08-16 Thread PIKAL Petr
Hi > -Original Message- > From: Weiwu Zhang [mailto:zhangwe...@realss.com] > Sent: Friday, August 16, 2013 9:55 AM > To: PIKAL Petr > Cc: r-help@r-project.org > Subject: Re: [R] to match samples by minute > > 2013/8/16 PIKAL Petr : > > You will get only general answer without some example

[R] GUI tools for R

2013-08-16 Thread ashz
Hi, I wish to build a GUI for my R script, what are the best and easiest tools to use and which ones as good documentation or books? Thanks -- View this message in context: http://r.789695.n4.nabble.com/GUI-tools-for-R-tp4673925.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] to match samples by minute

2013-08-16 Thread Weiwu Zhang
2013/8/16 PIKAL Petr : > You will get only general answer without some example data. Se Posting Guide. Thanks. Yes I do expect general answer, because I feel this problem of "unmatched samples" is ubiquitious, only that I don't have a good Google keyword to dig myself. > df.m <- merge(df1, df2, b

Re: [R] to match samples by minute

2013-08-16 Thread Weiwu Zhang
2013/8/16 PIKAL Petr : > It depends what unixtime is. At least str(df) can help. Thanks. Indeed following you suggestion I found it easier to use than summary() for debugging. Now I can properly handle POSIXct thanks to the help I got from this list a few weeks ago:) > I am not sure if it is the

Re: [R] Issue installing Packages

2013-08-16 Thread Uwe Ligges
Works for me. If this happens for several mirrors and more than on e package, I believe it is a local/internal problem of your network setup. Please ask your IT staff. Uwe Ligges On 15.08.2013 20:54, Alexandre Khelifa wrote: Hi Guys, Hope you are doing good. I am using R (3.0.1 - 32 b

Re: [R] problem installing RDCOMEvents

2013-08-16 Thread Prof Brian Ripley
Are you serious: 'R version 2.9.1 (2009-06-26)' ? Please see the posting guide (see the footer of this message), and 1) Update your R. 2) If this still does not work, ask the package maintainer. On 16/08/2013 09:29, Kishor Tappita wrote: Dear R-Users, I am getting the below error when I am

[R] คำถาม

2013-08-16 Thread Boonchai Oua-arunkij
I working with the R Text Mining in Thai Language. I got a problem and i want to ask something, please.1.Program R Studio can read Thai language but it's not complete. It's can fix? 2.I need to run code to be a graft. How i can writing the code? please suggest me. Thank you very much ขอคà

[R] Error in cmp function, COMPoissonReg package

2013-08-16 Thread Bündgens , Silke , Dipl . -Psych .
Hi, I would like to calculate a Conway-Maxwell-Poisson Regression with the cmp function of the COMPoissonReg package. However, when I try to run the model, ... cmp_model = cmp(formula = Vergleich ~c_0001 * Art_Vergleich

[R] Adding additional points to ggplot2

2013-08-16 Thread Chris89
Hi! I am having a difficulty adding additional points to a plot using ggplot2.. The case is that I want to plot both original and estimated values in the same graph, and general I would use plot and then lines, but I do not know how to do it with ggplot... Thanks! Regards, Chris -- View this

Re: [R] problem installing RDCOMEvents

2013-08-16 Thread Kishor Tappita
Dear Prof Ripley, Thanks for your reply. I tried with R -versions (R-3.0.1 & R-2.15.2) but was having problem with installing the dependencies such as SWinRegistry,SWinTypeLibs. With R version 2.9.1, I was able to install all the dependencies but am having problem with installing RDCOMEvents. As

[R] Output from unix PS

2013-08-16 Thread mohan . radhakrishnan
Hi, When I view this output from the unix command ''ps'' the columns seem to properly aligned but it is not read properly into the data frame. The aggregate function throws Error in aggregate.data.frame(data, by = list(COMMAND), FUN = sum) : object 'COMMAND' not found Is there a recomendation

Re: [R] GUI tools for R

2013-08-16 Thread mohan . radhakrishnan
Hi, I am not the expert but I came across shiny.rstudio.org. It has Twitter bootstrap as its foundation. Others will know if there is a proper web framework that R can integrate with. Thanks.

Re: [R] Output from unix PS

2013-08-16 Thread Sarah Goslee
You don't tell us your OS details or provide an actual reproducible example, but the error suggests that COMMAND is not one of the column names in your data frame. Have you checked that? When I run ps on my Fedora system, the column name is CMD and not COMMAND. Sarah On Fri, Aug 16, 2013 at 7:30

Re: [R] Output from unix PS

2013-08-16 Thread mohan . radhakrishnan
My code is not complete. But the headers I see are USER PID %CPU %MEMVSZ RSS TTY STAT START TIME COMMAND 684517 0.0 0.0 12348 864 ?SAug08 0:00 hald-addon-keyboard: listening on /dev/input/event1 684521 0.0 0.0 12348 860 ?SAug08

Re: [R] Output from unix PS

2013-08-16 Thread Sarah Goslee
What does str(yourdata) return? How about including dput(head(yourdata, 20)) in your email to create a reproducible example? Sarah On Fri, Aug 16, 2013 at 9:08 AM, wrote: > My code is not complete. But the headers I see are > > USER PID %CPU %MEMVSZ RSS TTY STAT START TIME C

Re: [R] Output from unix PS

2013-08-16 Thread Sarah Goslee
Both of these make it entirely clear that your attempt to import your ps results as a data frame didn't do what you thought. Instead of being separate columns, you have one factor column (because the default behavior is to import strings as factors). There's no column named COMMAND, just a column

Re: [R] Output from unix PS

2013-08-16 Thread mohan . radhakrishnan
This is the output. > str(data) 'data.frame': 78 obs. of 1 variable: $ USER...PID..CPU..MEMVSZ...RSS.TTY..STAT.START...TIME.COMMAND: Factor w/ 78 levels "684504 0.0 0.0 31680 4596 ?Ss Aug08 0:01 hald",..: 17 18 19 20 21 22 23 24 25 26 ... > dput(head(data,

Re: [R] Adding additional points to ggplot2

2013-08-16 Thread Ista Zahn
Hi Chris, Just add a second geom_point() call and override the y axis mapping. For example: library(ggplot2) ggplot(mtcars, aes(x=hp, y=mpg)) + geom_point() + geom_point(aes(y=qsec), color="red") Best, Ista On Fri, Aug 16, 2013 at 5:45 AM, Chris89 wrote: > Hi! > I am having a difficulty ad

Re: [R] Plotting Multiple Factors By Dates With Lattice

2013-08-16 Thread Rich Shepard
On Thu, 15 Aug 2013, Rich Shepard wrote: Now I see the source of my error: I quoted the data file name! Removing the quotation marks produces the plots. Thanks to A.K. and Dennis Murphy I understand how to plot the data in these data sets. However, I am not getting the colors within the plot

Re: [R] Output from unix PS

2013-08-16 Thread jim holtman
Here is what I would do to read your data: > psAll <- readLines("/temp/node1-ps-1.txt") > ps <- read.table(text = substring(psAll, 1, 65) # parse the first part + , header = TRUE + , as.is = TRUE + , fill = TRUE + , check.names = FAL

Re: [R] Repeated measures Cox regression ??coxph??

2013-08-16 Thread Göran Broström
Sorry I'm late with this. On 07/26/2013 02:02 PM, Terry Therneau wrote: Two choices. If this were a linear model, do you like the GEE approach or a mixed effects approach? Assume that "subject" is a variable containing a per-subject identifier. GEE approach: add "+ cluster(subject)" to the mode

Re: [R] Plotting Multiple Factors By Dates With Lattice

2013-08-16 Thread Richard M. Heiberger
The major problem is all the padding and the LF in the level names. This repair is based on the ?gsub example on "## trim trailing white space". levels(bdf$func_feed_grp) ## [1] " Filterer\n" " Gatherer " " Grazer" " Omnivore " ## [5] " Parasite " " Predator " " Shredde

Re: [R] Plotting Multiple Factors By Dates With Lattice

2013-08-16 Thread Rich Shepard
On Fri, 16 Aug 2013, Richard M. Heiberger wrote: The major problem is all the padding and the LF in the level names. This repair is based on the ?gsub example on "## trim trailing white space". Rich Thanks. I thought of removing white space (didn't notice the spurious newline) in emacs but

Re: [R] regex challenge

2013-08-16 Thread William Dunlap
The following makes the name converter function an argument to ff (and restores the colon operator to the list of formula operators), but I'm not sure what you need the converter to do. ff <- function(expr, convertName = function(name)paste0(toupper(name), "z")) { if (is.call(expr) && is.nam

Re: [R] คำถาม

2013-08-16 Thread David Winsemius
On Aug 16, 2013, at 12:50 AM, Boonchai Oua-arunkij wrote: > I working with the R Text Mining in Thai Language. I got a problem and i want > to ask something, please.1.Program R Studio can read Thai language but it's > not complete. It's can fix? This is not the support list for R Studio. > 2.

[R] about plantbreeding library

2013-08-16 Thread Waqas Shafqat
Sir i have successfully installed plant breeding library following the procedure on the web.. but problem is that plantbreeding library does not working I have tried it in both version i.e RGui 3.0.0 and RGui 3.0.1. please guide me [[alternative HTML version deleted]]

Re: [R] regex challenge

2013-08-16 Thread Frank Harrell
Thanks Bill. The problem is one of the results of convertName might be 'Heading("Age in Years")*age' (this is for the tables package), and as.name converts this to `Heading("...")*age` and the backticks cause the final formula to have a mixture of regular elements and ` ` quoted expression el

Re: [R] Memory limit on Linux?

2013-08-16 Thread Stackpole, Chris
Greetings, Just a follow up on this problem. I am not sure where the problem lies, but we think it is the users code and/or CRAN plugin that may be the cause. We have been getting pretty familiar with R recently and we can allocate and load large datasets into 10+GB of memory. One of our other

[R] Envelope curve for scatterplot

2013-08-16 Thread frauke
Hi, to be concise, let me start with my problem: I have a scatterplot that I want to fit an envelope curve to. The picture of the scatterplot is below. I have 140 of these plots that I need to compare. Rather than to visual

Re: [R] A question about using delayedAssign

2013-08-16 Thread Duncan Murdoch
On 13-08-14 9:11 PM, Gang Peng wrote: I run the examples in delayedAssign: msg <- "old" delayedAssign("x", msg) msg <- "new!" x If I run these four commands together, x is "new". If I run the first two commands first and then run the last two commands, x is "old". I just cannot figure out why.

Re: [R] Plotting Multiple Factors By Dates With Lattice

2013-08-16 Thread arun
You could remove the white space also by: library(stringr) levels(bdf$func_feed_grp) #[1] "Filterer"    " Gatherer  " " Grazer    " " Omnivore  " #[5] " Parasite  " " Predator  " " Shredder  " levels(bdf$func_feed_grp)<- str_trim(levels(bdf$func_feed_grp)) levels(bdf$f

Re: [R] Plotting GAM fit using RGL

2013-08-16 Thread Duncan Murdoch
On 13-08-15 1:15 PM, David Winsemius wrote: On Aug 15, 2013, at 2:23 AM, Lucas Holland wrote: Hello all, I’ve fitted a bivariate smoothing model (with GAM) to some data, using two explanatory variables, x and y. Now I’d like to add the surface corresponding to my fit to a 3D scatterplot ge

Re: [R] Memory limit on Linux?

2013-08-16 Thread David Winsemius
On Aug 16, 2013, at 10:19 AM, Stackpole, Chris wrote: > Greetings, > > Just a follow up on this problem. I am not sure where the problem lies, but > we think it is the users code and/or CRAN plugin that may be the cause. We > have been getting pretty familiar with R recently and we can allocat

Re: [R] Weighted SUR/NSUR

2013-08-16 Thread Ariel
Arne Henningsen-3 wrote >> Is it possible >> to run SUR with weights using systemfit? I mean weighted seemingly > unrelated >> regression (weighted SUR) > > Currently, systemfit cannot estimate (SUR) models with > observation-specific > weights :-( > >> or weighted nonlinear unrelated regression

Re: [R] A question about using delayedAssign

2013-08-16 Thread William Dunlap
Change delayedAssign("x", msg) to delayedAssign("x", { cat("Assigning 'msg' to 'x' now\n") ; msg }) and you will see the message when the delayed assignment is triggered. You could add print(sys.calls()) to that to see the call stack if it isn't obvious. > msg <- "old" > delayedAssign("x", {

Re: [R] Multi Correspondence Analysis

2013-08-16 Thread arun
Hi, You can upload the dataset using: library(XLConnect)  wb<-loadWorkbook("excel_data.xlsx")  dat1<- readWorksheet(wb,sheet="excel data",region="A1:DA101") #region can be specified to read a subset of the dataset.  Here, I read the full #dataset. dim(dat1) #[1] 100 105 str(dat1) #'data.frame': 

Re: [R] about plantbreeding library

2013-08-16 Thread Marc Girondot
Le 16/08/13 19:48, Waqas Shafqat a écrit : Sir i have successfully installed plant breeding library following the procedure on the web.. but problem is that plantbreeding library does not working I have tried it in both version i.e RGui 3.0.0 and RGui 3.0.1. please guide me [[alterna

Re: [R] Plotting GAM fit using RGL

2013-08-16 Thread David Winsemius
On Aug 16, 2013, at 10:55 AM, Duncan Murdoch wrote: > On 13-08-15 1:15 PM, David Winsemius wrote: >> >> On Aug 15, 2013, at 2:23 AM, Lucas Holland wrote: >> >>> Hello all, >>> >>> I’ve fitted a bivariate smoothing model (with GAM) to some data, using two >>> explanatory variables, x and y. N

Re: [R] Adding additional points to ggplot2

2013-08-16 Thread zelfortin
Hi, you could also use a factor variable to differentiate your observed and estimated values and change shape and/or color based on that factor. e.g. ggplot(aes(x=X,y=Y, shape=factor(Type))) + geom_point() #For changing shapes ggplot(aes(x=X,y=Y, color=factor(Type))) + geom_point()

[R] Is it possible to avoid copying arrays when calling list()?

2013-08-16 Thread MRipley
Usually R is pretty good about not copying objects when it doesn't need to. However, the list() function seems to make unnecessary copies. For example: > system.time(x<-double(10^9)) user system elapsed 1.772 4.280 7.017 > system.time(y<-double(10^9)) user system elapsed 2.564

[R] Randomly drop a percent of data from a data.frame

2013-08-16 Thread Christopher Desjardins
Hi, I have the following data. > set.seed(6245) > data <- data.frame(x1=rnorm(5),x2=rnorm(5),x3=rnorm(5),x4=rnorm(5)) > round(data,digits=3) x1 x2 x3 x4 1 0.482 1.320 -0.859 -0.142 2 -0.753 -0.041 -0.063 0.886 3 0.028 -0.256 -0.069 0.354 4 -0.086 0.475 0.244 0.781 5 0.69

Re: [R] Memory limit on Linux?

2013-08-16 Thread Stackpole, Chris
> From: David Winsemius [mailto:dwinsem...@comcast.net] > Sent: Friday, August 16, 2013 12:59 PM > Subject: Re: [R] Memory limit on Linux? [snip] > > In short, we don't have a solution yet to this explicit problem > > You may consider this to be an "explicit problem" but it doesn't read like > s

Re: [R] A question about using delayedAssign

2013-08-16 Thread William Dunlap
Are you using a GUI like RStudio to run R? If it, it may be looking at the values of things after each command to update its workspace window, and the looking will trigger the delayed assignments. (I cannot reproduce what you show using command line R on Linux.) Bill Dunlap Spotfire, TIBCO Softw

[R] Which skewness does pelpe3() from package "lmom" use?

2013-08-16 Thread frauke
Hi everyone, I was trying to fit a Log Pearson III distribution through some maxima data. I got thrown off because my results in Excel (using a frequency factor table) are different from my results using pelpe3() in the R-package "lmom". The only reason I can think of is the skewness. The Pears

Re: [R] Randomly drop a percent of data from a data.frame

2013-08-16 Thread arun
Hi, May be this helps: #data1 (changed `data` to `data1`) set.seed(6245)  data1 <- data.frame(x1=rnorm(5),x2=rnorm(5),x3=rnorm(5),x4=rnorm(5))  data1<- round(data1,digits=3) data2<- data1 data1[,3:4]<-lapply(data1[,3:4],function(x){x1<- match(x,sample(unlist(data1[,3:4]),round(0.8*length(unlist(

Re: [R] Randomly drop a percent of data from a data.frame

2013-08-16 Thread arun
Hi, Suppose the dataset had odd number of columns: set.seed(6458)  data2<- data.frame(x1=rnorm(5),x2=rnorm(5),x3=rnorm(5)) n<- prod(dim(data2))  n #[1] 15 dummy<- rep(F,n/2) dummy[sample(1:(n/2),n*.2)]<-T dummy #[1]  TRUE FALSE  TRUE FALSE FALSE FALSE  TRUE data2[,c("x2", "x3")][matrix(dummy, nc

Re: [R] Randomly drop a percent of data from a data.frame

2013-08-16 Thread Christopher Desjardins
Hi, Thanks for the help. What I actually ended up doing was writing a copy of for loops and I ended up getting something works. Thanks. Chris On Fri, Aug 16, 2013 at 4:34 PM, arun wrote: > Hi, > May be this helps: > #data1 (changed `data` to `data1`) > set.seed(6245) > data1 <- data.frame(x1=r

Re: [R] A question about using delayedAssign

2013-08-16 Thread Gang Peng
Hi Bill, Thanks. According to the output, the assignment was triggered immediately after 'delayedAssign'. So strange. > msg <- "old" > delayedAssign("x", { cat("Assigning 'msg' to 'x' now\n") ; msg }) > msg <- "new!" > x Assigning 'msg' to 'x' now [1] "new!" > msg <- "old" > delayedAssign("x", {

Re: [R] A question about using delayedAssign

2013-08-16 Thread Gang Peng
Hi Duncan, I did nothing between running the first two and the last two. The following is the output: > msg <- "old" > delayedAssign("x", msg) > msg <- "new!" > x [1] "new!" > msg <- "old" > delayedAssign("x", msg) > msg <- "new!" > x [1] "old" Thanks, Gang 2013/8/16 Duncan Murdoch > On 13-0

Re: [R] Issue installing Packages

2013-08-16 Thread Alexandre Khelifa
Hi, Works well now. Don't know if any server was done or if it was something wrong with my firewall... Thanks a lot for the quick response though. Alexandre On Fri, Aug 16, 2013 at 2:53 AM, Uwe Ligges wrote: > Works for me. > > If this happens for several mirrors and more than on e package,

Re: [R] Randomly drop a percent of data from a data.frame

2013-08-16 Thread Richard Kwock
Try this: data <- data.frame(x1=rnorm(5),x2=rnorm(5),x3=rnorm(5),x4=rnorm(5)) data <- round(data,digits=3) #get the total counts n = prod(dim(data)) #set up a dummy array/matrix dummy <- rep(F, n/2) dummy[sample(1:(n/2), n*.2)] <- T # 5x2 dummy matrix with T and F matrix(dummy, nc = 2) #subset

Re: [R] A question about using delayedAssign

2013-08-16 Thread Gang Peng
I see. I am using RStudio. Thanks, Gang 2013/8/16 William Dunlap > Are you using a GUI like RStudio to run R? If it, it may be looking > > at the values of things after each command to update its workspace > > window, and the looking will trigger the delayed assignments. > > ** *

Re: [R] Is it possible to avoid copying arrays when calling list()?

2013-08-16 Thread Gang Peng
If you don't want to copy the data, you can use environments. You can first define x and y in the global environment and then in the function, use function get() to get x, y in the global environment. When you change x and y in the function, x and y also change in the global environment. Best, Gan

[R] bySum error in ffbase package ?

2013-08-16 Thread Steve Chen
Hi all, Since I upgraded to R3.0.1 and also upgraded ffbase package, I got the following error when using bySum( ) funciton in ffbase. For example: > library(ffbase) > bySum(iris$Sepal.Length,iris$Species) Error in bySum(iris$Sepal.Length, iris$Species) :   REAL() can only be applied to a 'num

Re: [R] Is it possible to avoid copying arrays when calling list()?

2013-08-16 Thread David Winsemius
On Aug 16, 2013, at 2:23 PM, Gang Peng wrote: > If you don't want to copy the data, you can use environments. You can first > define x and y in the global environment and then in the function, use > function get() to get x, y in the global environment. When you change x and > y in the function, x

[R] is there anything wrong with doing a multinomial logistic like it is a binary logistic regression?

2013-08-16 Thread Eunice Chou
My outcome variable (y) is 3 categories. Is there anything bad about using the following code to get a parameter estimate for my bivariate model? publicfit = glm(y ~ public, data=dataSPSS.vmj, family=binomial) [[alternative HTML version deleted]] _

[R] R strucplot residuals legend font

2013-08-16 Thread Gabrielle Hodge
Is there any way to change the font of a residuals-based legend in the strucplot framework, e.g. mosaic or assoc plots? I've created labels in mosaic plots and extended association plots with serif font by specifying the font in the labeling and labeling_args parameters. This makes the text in t

[R] Error in Corpus() in tm package

2013-08-16 Thread Ajinkya Kale
I am trying to use the text mining package ... I keep getting this error : rm(list=ls()) library(tm) sourceDir <- "Z:\\projectk_viz\\docs_to_index" ovid <- Corpus(DirSource(sourceDir),readerControl = list(language = "lat")) Error in if (vectorized && (length <= 0)) stop("vectorized sources must h

[R] Fwd: about plantbreeding library

2013-08-16 Thread Waqas Shafqat
-- Forwarded message -- From: Waqas Shafqat Date: Sat, Aug 17, 2013 at 10:18 AM Subject: Re: [R] about plantbreeding library To: Marc Girondot problem 1 stability analysis >setwd("E:/") > Data <- read.table(file="setwd.csv", header=TRUE, sep=",") > > Data environments genoty

Re: [R] latin1 encoding in WriteXLS

2013-08-16 Thread Rainer Hurling
Am 13.08.2013 19:40, schrieb Hugo Varet: > Dear R users, > > I've just updated the WriteXLS package (on R 3.0.1) and I now have an error > when exporting a data.frame with the argument Encoding="latin1". For > example, these two lines work: >library(WriteXLS) >WriteXLS("iris", "iris.xls")

Re: [R] Fwd: about plantbreeding library

2013-08-16 Thread Patrick Connolly
On Sat, 17-Aug-2013 at 10:18AM +0500, Waqas Shafqat wrote: |> -- Forwarded message -- |> From: Waqas Shafqat |> Date: Sat, Aug 17, 2013 at 10:18 AM |> Subject: Re: [R] about plantbreeding library |> To: Marc Girondot |> |> |> problem 1 |> stability analysis |> |> >setwd("E:/")

Re: [R] Fwd: about plantbreeding library

2013-08-16 Thread Jeff Newmiller
Please keep in mind that this is the R-help mailing list, not the plantbreeding-help mailing list, so most (perhaps all) of us don't know what the theory behind your work is. The fact that you are attempting to load data sets and use functions that are not accessible yet you are forging on anywa