Re: [R] How to plot data using ggplot

2014-04-07 Thread PIKAL Petr
Hi -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of drunkenphd Sent: Friday, April 04, 2014 8:53 PM To: r-help@r-project.org Subject: Re: [R] How to plot data using ggplot djmuseR wrote Do you mean a continuous range

Re: [R] solicit help to read in 384 plate color image

2014-04-07 Thread PIKAL Petr
Hi There was package rimage which could read jpeg file in colours and manipulate with it. However it is not actively maintained and therefore it does not work in recent versions of R. I believe that R 2.14.0 is the last version able to use rimage. It was quite simple and I was tempted to start

[R] Micro-point with pch=16?

2014-04-07 Thread Андрей Парамонов
Hello! I'm trying to plot a 3D dataset as a scatter-plot, coding Z-axis values with point size. I pass the following parameters to plot function: type = 'p', pch = 16, cex = intensity/max(intensity) In my dataset, max(intensity)/min(intensity) is ~4000. However, visual points vary in radius

Re: [R] How to make a proper use of blocking in limma using voom

2014-04-07 Thread Steve Lianoglou
Hi, This is a bioconductor-related question so please post any follow up questions on that mailing list. You can sign up to that list here: https://stat.ethz.ch/mailman/listinfo/bioconductor Comments in line: On Sun, Apr 6, 2014 at 10:41 PM, Catalina Aguilar Hurtado cata...@gmail.com wrote:

Re: [R] solicit help to read in 384 plate color image

2014-04-07 Thread Spencer Graves
Have you considered the Bioconductor package EBImage? See www.bioconductor.org/packages/release/bioc/html/EBImage.html. I found it using findFn{sos}. It seems well developed, well maintained AND includes a vignette that simplifies the job of learning how to use it.

Re: [R] solicit help to read in 384 plate color image

2014-04-07 Thread PIKAL Petr
Hi Yes I know about EBImage. It was rather too complicated for some simple tasks reading image, performing rowwise/colwise computations and summing or averaging of rows or columns which was my task (and I had some code from ancient times which used rimage :). However when I read introduction

Re: [R] Mistakes in date conversion for future date/time (POSIXct)

2014-04-07 Thread Winkler, Matthias
Thank you for your answers. They helped me a lot! I used R 3.1.0 RC and the mistake didn't show up. I also made an additional test, the same as David McPearson did: I tried it again with R 3.0.3 on a pc with 2 OS (Windows 7 and Linux). The error showed up at the windows system but not in

[R] R script on Rstudio server

2014-04-07 Thread T Bal
Hi, I want to install Rstudio server. The reason for that is that I want to run R script on this server. In this R script I am loading (working with) very large data with size 1000 Mb. When I run this R script I get memory error. If I run this script on Rstudio server, will I not have this

Re: [R] skipping an error message

2014-04-07 Thread Jim Lemon
On 04/07/2014 06:46 PM, Naser Jamil wrote: Hi Jim, Thanks for the suggestion. What I understand is trying something like tryCatch(nlme(conc~f2(dose,Theta1,Theta 2,Theta3,t), fixed=Theta1+Theta2+Theta3~1, data=grouped.data, random=Theta1+Theta2+Theta3~1, start=list(fixed=ini.pkpara))

Re: [R] Micro-point with pch=16?

2014-04-07 Thread Jim Lemon
On 04/07/2014 04:33 PM, Андрей Парамонов wrote: Hello! I'm trying to plot a 3D dataset as a scatter-plot, coding Z-axis values with point size. I pass the following parameters to plot function: type = 'p', pch = 16, cex = intensity/max(intensity) In my dataset, max(intensity)/min(intensity)

Re: [R] How to use an elements' name when creating a data frame via a for loop

2014-04-07 Thread arun
Hi, May be this helps: stations - LETTERS[1:4] set.seed(42) PM2.5 - data.frame(DateTime=seq(as.POSIXct(2010-01-10 01:00:00),length.out=10,by= 1 day), station= sample(LETTERS[1:4],10,replace=TRUE)) for(i in 1:length(stations))

[R] Conditional subtraction

2014-04-07 Thread Katherine Gobin
Dear R forum I have following data.frame dat = data.frame(key = c(A, B, C, D, E, E), id = c(instru_A, instru_B, instru_B, instru_B, instru_C, instru_C), price = c(101.38, 3.9306, 3.7488, 92.9624, 5.15, 96.1908), adj_factor = c(2.08, 2.5217, 2.5217, 2.5217, 3.08, 3.08)) dat   key       id    

Re: [R] invalid factor level, NA generated error message help

2014-04-07 Thread arun
Hi, May be this helps: number_of_stations - 3 label - c(s1,s2,s3,s4) label1 - combn(label[1:number_of_stations],2) label.i - character(0)calc_distances - function(z,a){ for(i in 1:z){lab.i - paste(a[1,i],a[2,i],sep=-) label.i - c(label.i,lab.i)}

Re: [R] Conditional subtraction

2014-04-07 Thread arun
Hi, Try: indx - as.vector(with(dat,tapply(seq_along(price), list(id), FUN= head,1))) dat$adjusted_price - dat$price dat$adjusted_price[indx] - with(dat, price[indx]-adj_factor[indx]) dat # key idprice adj_factor adjusted_price #1 A instru_A 101.3800 2.080099.3000 #2

Re: [R] Conditional subtraction

2014-04-07 Thread Rui Barradas
Hello, Try the following. fun - function(x){ x[[adjusted_price]] - x[[price]] x[[adjusted_price]][1] - x[[price]][1] - x[[adj_factor]][1] x } res - do.call(rbind, lapply(split(dat, dat$id), fun)) rownames(res) - NULL res Hope this helps, Rui Barradas Em 07-04-2014

Re: [R] R script on Rstudio server

2014-04-07 Thread Qiang Kou
In my opinion, it really depends on the memory size of the machine. Best, KK On Mon, Apr 7, 2014 at 3:01 AM, T Bal studentt...@gmail.com wrote: Hi, I want to install Rstudio server. The reason for that is that I want to run R script on this server. In this R script I am loading (working

Re: [R] skipping an error message

2014-04-07 Thread Naser Jamil
Hi Jim, Thanks for the suggestion. What I understand is trying something like tryCatch(nlme(conc~f2(dose,Theta1,Theta 2,Theta3,t), fixed=Theta1+Theta2+Theta3~1, data=grouped.data, random=Theta1+Theta2+Theta3~1, start=list(fixed=ini.pkpara)) ) Is that correct? Once again thanks.

Re: [R] Micro-point with pch=16?

2014-04-07 Thread Андрей Парамонов
07.04.2014 12:51, Jim Lemon пишет: On 04/07/2014 04:33 PM, Андрей Парамонов wrote: Hello! I'm trying to plot a 3D dataset as a scatter-plot, coding Z-axis values with point size. I pass the following parameters to plot function: type = 'p', pch = 16, cex = intensity/max(intensity) In my

Re: [R] Micro-point with pch=16?

2014-04-07 Thread Boris Steipe
Since you won't be able to see the effect on-screen, how about a little script that post-processes the SVG? B. On 2014-04-07, at 7:07 AM, Андрей Парамонов wrote: 07.04.2014 12:51, Jim Lemon пишет: On 04/07/2014 04:33 PM, Андрей Парамонов wrote: Hello! I'm trying to plot a 3D dataset as a

[R] installing r on ubuntu ?

2014-04-07 Thread Witold E Wolski
Hi, trying to install newest R on ubuntu I follow the instructions at: http://cran.at.r-project.org/bin/linux/ubuntu/ I added: deb http://cran.r-mirror.de/bin/linux/ubuntu saucy/ to: /etc/apt/sources.list running : sudo apt-get update produces : W: GPG error: http://cran.r-mirror.de

Re: [R] installing r on ubuntu ?

2014-04-07 Thread Qiang Kou
Try this: gpg --keyserver subkeys.pgp.net --recv 51716619E084DAB9 gpg --export --armor 51716619E084DAB9 | sudo apt-key add - Best, KK On Mon, Apr 7, 2014 at 11:05 AM, Witold E Wolski wewol...@gmail.com wrote: Hi, trying to install newest R on ubuntu I follow the instructions at:

Re: [R] rpart and randomforest results

2014-04-07 Thread Liaw, Andy
Hi Sonja, How did you build the rpart tree (i.e., what settings did you use in rpart.control)? Rpart by default will use cross validation to prune back the tree, whereas RF doesn't need that. There are other more subtle differences as well. If you want to compare single tree results, you

Re: [R] skipping an error message

2014-04-07 Thread William Dunlap
Thanks for the suggestion. What I understand is trying something like tryCatch(nlme(conc~f2(dose,Theta1,Theta 2,Theta3,t), fixed=Theta1+Theta2+Theta3~1, data=grouped.data, random=Theta1+Theta2+Theta3~1, start=list(fixed=ini.pkpara)) ) Is that correct? No. Executing

Re: [R] R script on Rstudio server

2014-04-07 Thread Jeff Newmiller
Please read the Posting Guide. RStudio has a support forum of their own, and you should post in plain text. That said, RStudio Server is just a user interface for the R software installed on the server it runs on. This is a great place to ask questions about R, but not about how to add memory

Re: [R] average of rows of each column

2014-04-07 Thread Sébastien Durier
Hello, A solution which avoids apply functions is also possible and maybe quicker for large matrices : n.row - 120 n.col - 1000 n.mean - 10 mat - matrix(rnorm(n.col*n.row), nrow = n.row) res - rowMeans(matrix(mat, ncol = n.mean, byrow = T)) dim(res) - c(n.row/n.mean, n.col) SD 2014-04-04

Re: [R] Base within reverses column order

2014-04-07 Thread David Winsemius
On Apr 4, 2014, at 10:32 AM, Dan Murphy wrote: I just noticed this annoyance, but I'm not the first one, apparently -- see http://lists.r-forge.r-project.org/pipermail/datatable-help/2012-May/001176.html The thread never answered the OP's question Is this a bug? so I assume the answer,

Re: [R] average of rows of each column

2014-04-07 Thread dcarlson
Actually how about 1:30pm today. I'm on Alvard's Jobinar panel from 12:30-1:30pm. David -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of David Carlson Sent: Friday, April 4, 2014 3:15 PM To: 'eliza botto'; r-help@r-project.org

[R] Adding correlation and or variance structure in mixed models

2014-04-07 Thread Laz
Dear R users, I am using mixed models to analyze genetic experiments. I have tried to use R packages such as lme4, nlme. I am looking for a model that can allow me to specify my correlation structure and the same time allow to have more than 2 random effects in the model. None of the above

Re: [R] Label axis tick marks with a simple function of axis value

2014-04-07 Thread MacQueen, Don
If you want to customize tick mark labels, use the axis() function. Something along the lines of plot(x,y, xaxt='n') xat - pretty(x) axis(1, at=xat, labels=1/xat) -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On

[R] Time interactions for coxph object

2014-04-07 Thread Tim Marcella
Hi All, I am working in the 'survival' library and need to know how to code a variable time interaction for left truncated data (not all subjects followed from the start of the study). I therefor add in the entry time and exit time variables into the formula. Here is my basic formula

Re: [R] Micro-point with pch=16?

2014-04-07 Thread Андрей Парамонов
07.04.2014 18:53, Boris Steipe пишет: Since you won't be able to see the effect on-screen, how about a little script that post-processes the SVG? B. It would be the way-to-go, but I'm not sure how to 1) determine which point corresponds to which element in svg file, 2) modify those mysterious

[R] Changes between R 3.1 vs 3.0.3

2014-04-07 Thread Marc Girondot
If there a list of changes between 3.1 and 3.0.3 ? For example, when using levels(), if was not a factor, in 3.0.3 it was changed as a factor but in 3.1 RC it returns NULL. Same for automatic conversion in numeric for characters used in algebric operations. New way is more strict

[R] Getting a particular weekday for a given month

2014-04-07 Thread Christofer Bogaso
Hi, Given a month name, I am looking for some script to figure out, what is the date for 3rd Wednesday. For example let say I have following month: library(zoo) Month - as.yearmon(as.Date(Sys.time())) I need to answer: What is the date for 3rd Wednesday of 'Month'? Really appreciate for any

Re: [R] Changes between R 3.1 vs 3.0.3

2014-04-07 Thread Ista Zahn
I would have thought a web search for R devel changelog would get you to the right place... Google gives me developer.r-project.org/blosxom.cgi/R-devel/NEWS as the first hit, which looks about right. best, Ista On Mon, Apr 7, 2014 at 1:22 PM, Marc Girondot marc_...@yahoo.fr wrote: If there a

Re: [R] Getting a particular weekday for a given month

2014-04-07 Thread Boris Steipe
Something like: # the third Wednesday m - as.Date(2014-04-01) format(m+which(format(m+0:30,%a) == Wed)[3]-1, %a %b %d) # or eg. all Tuesdays format(m+which(format(m+0:30,%a) == Tue)-1, %a %b %d) # or eg. the last Friday wd - which(format(m+0:30,%a) == Fri)-1 format(m+wd[length(wd)], %a %b %d)

Re: [R] Changes between R 3.1 vs 3.0.3

2014-04-07 Thread Duncan Murdoch
On 07/04/2014 1:22 PM, Marc Girondot wrote: If there a list of changes between 3.1 and 3.0.3 ? If you have 3.1.0rc installed, look in the HTML help system for the NEWS item. If you don't have it installed, a copy of the nightly news is on CRAN under new features in this version on

Re: [R] Getting a particular weekday for a given month

2014-04-07 Thread Ted Harding
On 07-Apr-2014 17:49:09 Christofer Bogaso wrote: Hi, Given a month name, I am looking for some script to figure out, what is the date for 3rd Wednesday. For example let say I have following month: library(zoo) Month - as.yearmon(as.Date(Sys.time())) I need to answer: What is the date

Re: [R] Base within reverses column order

2014-04-07 Thread Duncan Murdoch
On 05/04/2014 1:10 PM, Dan Murphy wrote: Thanks, Duncan. Using names is certainly the most reliable solution, but requires remembering to modify the surrounding code when enhancing what's within -- a bug risk source when passing on the code. Are you saying that an automatic reversal as follows

Re: [R] Getting a particular weekday for a given month

2014-04-07 Thread Gabor Grothendieck
On Mon, Apr 7, 2014 at 1:49 PM, Christofer Bogaso bogaso.christo...@gmail.com wrote: Hi, Given a month name, I am looking for some script to figure out, what is the date for 3rd Wednesday. For example let say I have following month: library(zoo) Month - as.yearmon(as.Date(Sys.time())) I

Re: [R] skipping an error message

2014-04-07 Thread Naser Jamil
Hi Bill, Many thanks for such a nice illustration. I tried the first option and it's working. More specifically, model.d - tryCatch(nlme(blah blah blah), error=function(e)NULL) if(!is.null(model.d)) { furtherProcessTheModel(model.d) } But instead of

[R] getting arg names in function calls?

2014-04-07 Thread Spencer Graves
How can I convert plot(0, 1) into plot(x=0, y=1)? More generally, how can I get argument names assigned to function calls in language objects? Example: tstFn - function()plot(0, 1) bo - body(tstFn) tstFnxy - function()plot(x=0, y=1) boxy - body(tstFnxy) Is

Re: [R] getting arg names in function calls?

2014-04-07 Thread William Dunlap
Look at match.call(). E.g., f - function(x, y = log2(x), ...) match.call() f() f() f(1, x=2, anotherArg=3, 4) f(x = 2, y = 1, anotherArg = 3, 4) or, using its 'definition' and 'call' arguments directly match.call(function(x, y, ...)NULL, quote(foo(1, x=2, extraArg=3, 4))) foo(x

Re: [R] Adding correlation and or variance structure in mixed models

2014-04-07 Thread Ben Bolker
Laz lmramba at ufl.edu writes: Dear R users, I am using mixed models to analyze genetic experiments. I have tried to use R packages such as lme4, nlme. I am looking for a model that can allow me to specify my correlation structure and the same time allow to have more than 2 random

Re: [R] Question: Do I need to set refit=FALSE when testing for random effects with anova()?

2014-04-07 Thread Christian Brauner
The question has been answered here: http://stackoverflow.com/questions/22892063/do-i-need-to-set-refit-false-when-testing-for-random-effects-in-lmer-models-wi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] How to use an elements' name when creating a data frame via a for loop

2014-04-07 Thread arun
Hi, It is not clear what you really want.  Now, you mentions ?merge() etc.  If you don't want to use ?assign(), lst - list(as.data.frame(matrix(1:40,ncol=5)), as.data.frame(matrix(1:20,ncol=4)), as.data.frame(matrix(1:25,ncol=5)),as.data.frame(matrix(21:30,ncol=2)))  stations -

[R] {metafor} variance explaination for paired pre-test/posttest

2014-04-07 Thread John Williams
In a previous post https://stat.ethz.ch/pipermail/r-help/2012-April/308946.html https://stat.ethz.ch/pipermail/r-help/2012-April/308946.html , the following calculation was given for imputing the variance of change scores for paired studies: // begin quote 2) Often, the dependent variable is

[R] What Directs R to Executable Directory?

2014-04-07 Thread Rich Shepard
I apparently had a prior version of R in /usr/local/, but deleted all R files in that subdirectory. Rebuilt R-3.0.3 and installed it in /usr/. However, when I try to start R as either a user or as root it aborts because it cannot find /usr/local/bin/R. Where is this information stored? I

Re: [R] What Directs R to Executable Directory?

2014-04-07 Thread William Dunlap
Running the Linux commands which R and echo $PATH | sed -e 's/:/\n/g' might give you a hint. (Exactly what did you install in /usr?) Bill Dunlap TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On

Re: [R] What Directs R to Executable Directory?

2014-04-07 Thread Rich Shepard
On Tue, 8 Apr 2014, William Dunlap wrote: Running the Linux commands which R Bill, That's how I found the installation in /usr/local/. After removing everything there and re-installing -3.0.3 with the /usr/ directory as the PREFIX, R is in /usr/bin/ and the libraries are in /usr/lib64/

Re: [R] Sweave files into LaTex

2014-04-07 Thread Axel Urbiz
Thanks Michael. That worked perfect! Best Axel. On Sat, Apr 5, 2014 at 2:13 PM, Michael Friendly frien...@yorku.ca wrote: If you use knitr, you can do, in master.Rnw Rcode, child=Rcode.Rnw= @ This is the equivalent of \input{} (but not \include{}) at the .Rnw level. At any rate, if you

[R] Plotting does odd line thing

2014-04-07 Thread David Doyle
Hello folks, When I use the lines function below it connects all my points but then draws a line back to the start point. Any suggestions on what is going on?? mydata -read.csv(http://doylesdartden.com/R/test_data.csv;, sep=,) attach(mydata) plot(EMD~Year,data=mydata, subset = Well.ID %in%

Re: [R] Plotting does odd line thing

2014-04-07 Thread Marc Girondot
Le 08/04/2014 04:20, David Doyle a écrit : Hello folks, When I use the lines function below it connects all my points but then draws a line back to the start point. Any suggestions on what is going on?? mydata -read.csv(http://doylesdartden.com/R/test_data.csv;, sep=,) attach(mydata)

Re: [R] Plotting does odd line thing

2014-04-07 Thread Jim Lemon
On 04/08/2014 12:20 PM, David Doyle wrote: Hello folks, When I use the lines function below it connects all my points but then draws a line back to the start point. Any suggestions on what is going on?? mydata-read.csv(http://doylesdartden.com/R/test_data.csv;, sep=,) attach(mydata)

Re: [R] Time interactions for coxph object

2014-04-07 Thread David Winsemius
On Apr 7, 2014, at 9:36 AM, Tim Marcella wrote: Hi All, I am working in the 'survival' library and need to know how to code a variable time interaction for left truncated data (not all subjects followed from the start of the study). I therefor add in the entry time and exit time variables

[R] Replacement Value

2014-04-07 Thread dila radi
Hi all, I have problem on how to replace value. I have this kind of data set: structure(list(A = c(0, 12.6, 10.1, 8.1, 14.4, 0, 0, 0, 0, 0.5, 12.9, 25.9, 49, 0, 0, 0, 0, 0, 7.8), B = c(0, 0, 9.1, 9.3, 1.5, 1, 1, 1, 1.7, 6, 0, 0, 0, 1.7, 3.8, 0, 0, 0, 1), C = c(1, 1, 9.10004, 9.2,

Re: [R] Replacement Value

2014-04-07 Thread Jim Lemon
On 04/08/2014 01:46 PM, dila radi wrote: Hi all, I have problem on how to replace value. I have this kind of data set: structure(list(A = c(0, 12.6, 10.1, 8.1, 14.4, 0, 0, 0, 0, 0.5, 12.9, 25.9, 49, 0, 0, 0, 0, 0, 7.8), B = c(0, 0, 9.1, 9.3, 1.5, 1, 1, 1, 1.7, 6, 0, 0, 0, 1.7, 3.8, 0, 0, 0,

Re: [R] Getting a particular weekday for a given month

2014-04-07 Thread Enrico Schumann
On Mon, 07 Apr 2014, Christofer Bogaso bogaso.christo...@gmail.com writes: Hi, Given a month name, I am looking for some script to figure out, what is the date for 3rd Wednesday. For example let say I have following month: library(zoo) Month - as.yearmon(as.Date(Sys.time())) I need to

Re: [R] Plotting does odd line thing

2014-04-07 Thread Frede Aakmann Tøgersen
Well the lines() function has a subset argument as does plot() so why not do this? lines(EMD ~ Year, data = mydata, subset = Well.ID %in% c(MW-1, D_EMD)) And yes lines() also have a data argument so why do you not use that (as you do with plot()) instead of attaching. Attaching dataframes may