[R] retrieving object names passed indirectly to a function

2010-09-15 Thread Michael Bedward
Hi folks, I'm stuck with a problem that I suspect has a trivial solution... I have a function, call it foo, that takes a number of arguments which it uses as parameters for a simulation. For later analysis, foo stores the names of the objects passed to it along with the simulation results in its

[R] HDP and 99% contour lines

2010-09-15 Thread Peter Spencer
Dear all, I have a very simple question about how I can include HPD confidence lines in a Marginal posterior distribution scatterplot I have the following code to draw the scatterplot(s) from an output table; par(mfrow=c(2,2)) plot(temp1[,5], temp1[,6], xlab=log10(r),

Re: [R] Using McNemar's test to detect shifts in response from pre- topost-treatment

2010-09-15 Thread Peter Dalgaard
On 09/14/2010 08:58 PM, Robert Baer wrote: McNemar is good for paired data. See ?mcnemar.test You need to get your data into the form of a matrix (e.g., help example), and you will need data organized by concordant and discordant pairing. This means that you will need to organize your

Re: [R] extracting objects from lists

2010-09-15 Thread Roman Luštrik
You can explore the structure of the list with str(). If you use Eclipse, a list of available options will be created for you as you type (see http://imagepaste.nullnetwork.net/viewimage.php?id=1293). Cheers, Roman -- View this message in context:

Re: [R] Multiple CPU HowTo in Linux?

2010-09-15 Thread Edwin Groot
Hello all, Thanks for your input, and helping to clear things up on where to go. I will try out the multicore package and see if there are further bottlenecks. It looks like some loops might need special treatment with parallelization. I have been pampered with the excellent walk-through vignettes

Re: [R] Problem with cat() == A related question

2010-09-15 Thread Martin Maechler
William Revelle li...@revelle.net on Tue, 14 Sep 2010 14:52:32 -0500 writes: At 3:45 PM -0400 9/14/10, jim holtman wrote: The problem is the 'cat' enclosing the 'print'; just get rid of the 'cat' -- that is what is causing the extra output On Tue, Sep 14, 2010 at

Re: [R] Problems with pdf device using plot glht function on multcomp library.

2010-09-15 Thread Torsten Hothorn
Dear Ken, it works for me on Linux. However, the print() commands around plot() are not necessary. Torsten __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] difftime problems with daylight saving time?

2010-09-15 Thread ravi
Hi, I seem to be having problems in calculating the period between two times, one with and the other without daylight saving time. Consider the following command : as.numeric(difftime(as.POSIXct(2010-04-01 06:00:00 CEST),as.POSIXct(2010-03-03 08:27:00 CET),units=hours)) [1] 692.55 No problem

Re: [R] Package build and install under Windows

2010-09-15 Thread Uwe Ligges
On 14.09.2010 21:05, Tao wrote: Any other method besides using RTOOLS? I am using R 2.10.1, which version of Rtools should I use? The most recent one that supports R-2.10.1? According to the webpage this is Rtools211.exe. It seems that there are two versions on the website. The

[R] Get File Names in Folder, Read Files, Update, and Write

2010-09-15 Thread Suphajak Ngamlak
Dear All, Could you please recommend how I can do this? I have several text files in one folder. Let's name them A0801.RSK, A0802.RSK, I would like R to 1) Know all file names in this folder 2) Update value in one column of these files 3) Write results in another

Re: [R] multiple cores/building fails

2010-09-15 Thread Uwe Ligges
On 14.09.2010 21:50, Gregory Ryslik wrote: Hi Everyone, I have written debugged and tested my code and it works (yay!). I recently tried to parallelize it (1 core/per tree) and when I run the code I get an error saying the object control was not found. I do have an object control in my code

Re: [R] Get File Names in Folder, Read Files, Update, and Write

2010-09-15 Thread Uwe Ligges
On 15.09.2010 10:55, Suphajak Ngamlak wrote: Dear All, Could you please recommend how I can do this? I have several text files in one folder. Let's name them A0801.RSK, A0802.RSK, I would like R to 1) Know all file names in this folder ?list.files 2) Update value

Re: [R] converting string vector to integer/numeric vector

2010-09-15 Thread Uwe Ligges
On 05.09.2010 14:48, rajesh j wrote: Hi, Is it possible to convert a string vector to integer or numeric vector? In my situation I receive data in a string vector and have to convert it based on a given type. ?as.interger ?as.numeric Uwe Ligges

Re: [R] assignment by value or reference

2010-09-15 Thread Uwe Ligges
See the R Language Definition manual. Since R knows about lazy evaluation, it is sometimes neither by reference nor by value. If you want to think binary, then by value fits better than by reference. Uwe Ligges On 05.09.2010 17:19, Xiaobo Gu wrote: Hi Team, Can you please tell

Re: [R] CRAN Mirror definition error.

2010-09-15 Thread Uwe Ligges
You may have a proxy in your network that has to be used. Since this seems to be Windows: Please see the R for Windows FAQs for more information. Best wishes, Uwe On 01.09.2010 19:43, Lenart, Joseph wrote: Hello, I was wondering if anyone has run across this problem in the past and might

Re: [R] Using feather.plot to try and generate a stick plot of current velocity data (and having issues)

2010-09-15 Thread Jim Lemon
On 09/15/2010 01:29 PM, Hughes, Ed wrote: Hello All, I am attempting to use the feather.plot function from the plotrix package to graph current velocity data as I have speed and direction. I let r be the first 10 rows of current speed data and theta be the first 10 rows of directional data

Re: [R] ggplot: stat_smooth() and nls method

2010-09-15 Thread Benoit Boulinguiez
great help, thanks a lot Le 14/09/2010 21:44, Brian Diggs a écrit : On 9/11/2010 7:52 AM, Benoit Boulinguiez wrote: Hi all, Does one of you know if there is any way to combine a nls method in the stat_smooth of ggplot? Regards According to the documentation for predict.nls, it is unable to

[R] Programming: loop versus vector oriented

2010-09-15 Thread Jan private
Dear all, I am new to R and to it's programming philosophy. The following function is supposed to work on a vector, but I can't figure out how to do that without looping through every element of it. Is there a more elegant way? Note: I have shortened it, so it is NOT correct from the pipe

[R] Interpolate? a line

2010-09-15 Thread Alaios
Hello everyone. I have created a 100*100 matrix in R. Let's now say that I have a line that starts from (2,3) point and ends to the (62,34) point. In other words this line starts at cell (2,3) and ends at cell (62,34). Is it possible to get by some R function all the matrix's cells that this

[R] R install in Fedora

2010-09-15 Thread wesley mathew
Dear All As you suggested I tried to install was trying to install R-2.11.1-3.fc13.1686 in Fedora-13-i386 but it also shows error. I wrote yum install R-2.11.1-3fc13.i686 Errors Cannot retrieve repository metadata (repond.xml) for repository: fedora. Please verify its path and try again.

[R] cochran-grubbs tests results

2010-09-15 Thread miguelgonzalez
Hello, I'm new in this R world and I don't know much about statistics, but now I have to analize some data and I've got some first queries yet: I have 5 sets of area mesures and each set has 5 repetitions. My first step is to check data looking for outliers. I've used the outliers package. I

Re: [R] Interpolate? a line

2010-09-15 Thread Michael Bedward
Hello Alex, Here is one way to do it. It works but it's not pretty :) interp - approx(c(2, 62), c(3, 34), method=linear, xout=2:62) m - matrix(c(interp$x, round(interp$y)), ncol=2) tie - m[,2] == c(-Inf, m[-nrow(m),2]) m - m[ !tie, ] You might want to examine the result like this... plot(m) #

Re: [R] Package build and install under Windows

2010-09-15 Thread Duncan Murdoch
Tao wrote: Any other method besides using RTOOLS? I am using R 2.10.1, which version of Rtools should I use? It seems that there are two versions on the website. What website are you talking about? The Rtools website http://www.murdoch-sutherland.com/Rtools/ has 7 different versions of

Re: [R] Interpolate? a line

2010-09-15 Thread Alaios
Thank you very much. I am trying to execute it line by line to get some understanding how this works. Could you please explain me what these two lines do? tie - m[,2] == c(-Inf, m[-nrow(m),2]) m - m[ !tie, ] I would like to thank you in advance for your help Best Regards Alex

Re: [R] Model averaging with (and without) interaction terms

2010-09-15 Thread Ben Bolker
Leslie Young leslie.young101 at gmail.com writes: I’ve used logistic regression to create models to assess the effect of 3 variables on the presence or absence of a species, including the interaction terms between variables and model averaging using MuMI: model.avg The top models

Re: [R] HDP and 99% contour lines

2010-09-15 Thread Ben Bolker
Peter Spencer P.Spencer at murdoch.edu.au writes: Dear all, I have a very simple question about how I can include HPD confidence lines in a Marginal posterior distribution scatterplot I have the following code to draw the scatterplot(s) from an output table; I think the code in

Re: [R] Interpolate? a line

2010-09-15 Thread Michael Bedward
Ah, now that you ask that I realize I was making an assumption assumption about what you want to achieve. Those two lines remove coords where the y value is equal to that of the preceding coord. That may or may not be what you want to do. To visualize what is happening, type plot(m) before doing

Re: [R] Interpolate? a line

2010-09-15 Thread David Winsemius
Replacing context: Hello everyone. I have created a 100*100 matrix in R. Let's now say that I have a line that starts from (2,3) point and ends to the (62,34) point. In other words this line starts at cell (2,3) and ends at cell (62,34). Is it possible to get by some R function all the

[R] A question on modelling binary response data using factors

2010-09-15 Thread Cormac Long
Dear all, A question on modelling proportional data in R. I have a test experiment that was designed in a particular way, and which I can analyse by hand to an extent. I am really struggling to get R to give me sensible results in modelling it properly, so must be doing something wrong here.

[R] barplot: space between axis and bars

2010-09-15 Thread Daniel Stepputtis
Hi all, I have a problem with a rather simple plot (which I have used several times) - barplot. I want to create a barplot, where no space is between the axis and the bars. Example: barplot(rnorm(10), space=0) creates a vertical axis at the left and bars. I want to skip the space between

Re: [R] Interpolate? a line

2010-09-15 Thread David Winsemius
On Sep 15, 2010, at 7:24 AM, David Winsemius wrote: Replacing context: Hello everyone. I have created a 100*100 matrix in R. Let's now say that I have a line that starts from (2,3) point and ends to the (62,34) point. In other words this line starts at cell (2,3) and ends at cell

Re: [R] content analysis

2010-09-15 Thread Bob Green
Christian, Have you looked at TM? There is also Quantitative Corpus Linguistics with R by Stefan Gries, which you may find of interest. Tau, Readme and rattle might be worth looking into. See also: http://ses.telecom-paristech.fr/lebart/ regards Bob

Re: [R] barplot: space between axis and bars

2010-09-15 Thread Thomas Stewart
Try par(xaxs=i) barplot(rnorm(10), space=0) -tgs On Wed, Sep 15, 2010 at 7:54 AM, Daniel Stepputtis daniel.stepput...@vti.bund.de wrote: Hi all, I have a problem with a rather simple plot (which I have used several times) - barplot. I want to create a barplot, where no space is between

Re: [R] retrieving object names passed indirectly to a function

2010-09-15 Thread Michael Bedward
Answering my own question (in case it's of use to anyone else) here is the example code again but now using call and eval to accomplish the desired output: foo - function(p1, p2) { p1name - deparse(substitute(p1)) p2name - deparse(substitute(p2)) # The real function runs a simulation, but

Re: [R] barplot: space between axis and bars

2010-09-15 Thread Jim Lemon
On 09/15/2010 09:54 PM, Daniel Stepputtis wrote: Hi all, I have a problem with a rather simple plot (which I have used several times) - barplot. I want to create a barplot, where no space is between the axis and the bars. Example: barplot(rnorm(10), space=0) creates a vertical axis at the

[R] Enumerating unit cell traversals Re: Interpolate? a line

2010-09-15 Thread David Winsemius
On Sep 15, 2010, at 7:55 AM, David Winsemius wrote: On Sep 15, 2010, at 7:24 AM, David Winsemius wrote: Replacing context: Hello everyone. I have created a 100*100 matrix in R. Let's now say that I have a line that starts from (2,3) point and ends to the (62,34) point. In other words

Re: [R] Enumerating unit cell traversals Re: Interpolate? a line

2010-09-15 Thread Michael Bedward
Nice posts David. I like the way that 'simple' problems such as this one give rise to an interesting assortment of approaches and gotchas :) Michael On 15 September 2010 22:41, David Winsemius dwinsem...@comcast.net wrote: On Sep 15, 2010, at 7:55 AM, David Winsemius wrote: On Sep 15, 2010,

Re: [R] Enumerating unit cell traversals Re: Interpolate? a line

2010-09-15 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 15/09/10 14:46, Michael Bedward wrote: Nice posts David. I like the way that 'simple' problems such as this one give rise to an interesting assortment of approaches and gotchas :) Michael On 15 September 2010 22:41, David Winsemius

Re: [R] R install in Fedora

2010-09-15 Thread Marc Schwartz
On Sep 15, 2010, at 5:14 AM, wesley mathew wrote: Dear All As you suggested I tried to install was trying to install R-2.11.1-3.fc13.1686 in Fedora-13-i386 but it also shows error. I wrote yum install R-2.11.1-3fc13.i686 Errors Cannot retrieve repository metadata (repond.xml) for

Re: [R] decision tree display

2010-09-15 Thread Uwe Ligges
If you are talking about an rpart object you are going to plot, see ?plot.rpart and ?text.rpart Uwe Ligges On 19.08.2010 23:10, Olga Shaganova wrote: I am using plot and text commands to display the decision tree I built, here is the code: plot(fit, compress=TRUE) text(fit,

Re: [R] About choosing file

2010-09-15 Thread Uwe Ligges
On 26.08.2010 09:50, Stephen Liu wrote: Hi folks, Following command only works on Windows Test01=read.table(file.choose(), header=TRUE) It popup open a dialog box for choosing file. But it doesn't work on Linux (Ubuntu); Test01=read.table(file.choose(), header=TRUE) Enter file name:

Re: [R] binary package build error:target 'xf-' is not a directory

2010-09-15 Thread Uwe Ligges
You have to build a *source* package under Linux in order to install it under Windows afterwards. A Linux binary package cannot be used under Windows. Best, Uwe Ligges On 31.08.2010 09:59, raje...@cse.iitm.ac.in wrote: Hi, I built a package in linux and generated its binary using R

Re: [R] Enumerating unit cell traversals Re: Interpolate? a line

2010-09-15 Thread David Winsemius
On Sep 15, 2010, at 8:58 AM, Rainer M Krug wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 15/09/10 14:46, Michael Bedward wrote: Nice posts David. I like the way that 'simple' problems such as this one give rise to an interesting assortment of approaches and gotchas :) Michael On

Re: [R] Error: cannot allocate vector of size X.0 Mb

2010-09-15 Thread John1983
Thank you all for the suggestions. We do intend to get more RAM space. Meanwhile I shall have a look at the ShortRead package features. -- View this message in context: http://r.789695.n4.nabble.com/Error-cannot-allocate-vector-of-size-X-0-Mb-tp2539031p2540518.html Sent from the R help mailing

Re: [R] how to convert a unix R package to windows installable zip file?

2010-09-15 Thread Uwe Ligges
On 24.08.2010 17:35, Jack Luo wrote: Hi, I downloaded a package with .gz extension, which presumably works for Unix, when I installed it directly on windows, it has the error msg: Error in gzfile(file, r) : cannot open the connection In addition: Warning messages: 1: In unzip(zipname, exdir

[R] Keyword to clear the screen

2010-09-15 Thread Ron Michael
Hi all, can anyone please tell me what is the key-word to clear the screen? I am aware of the cont+L, however I need some R-syntax, that can be typed into the console to clear the screen.   Thanks [[alternative HTML version deleted]] __

[R] Fwd: R install in Fedora

2010-09-15 Thread wesley mathew
Dear Sir Actually I tried in both ways : yum install R and sudo yum install R , but the error is same. I have root privilege, means I used the command su - and enter the password. May be its problem from Fedora. Thanks for your valuable help. I will post this issue in R-SIG-Fedora list. Kind

Re: [R] Enumerating unit cell traversals Re: Interpolate? a line

2010-09-15 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 15/09/10 15:23, David Winsemius wrote: On Sep 15, 2010, at 8:58 AM, Rainer M Krug wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 15/09/10 14:46, Michael Bedward wrote: Nice posts David. I like the way that 'simple' problems such

Re: [R] Keyword to clear the screen

2010-09-15 Thread Ivan Calandra
The first result of RSiteSearch(clear console) gives PBSmodelling::clearRcon() Ivan Le 9/15/2010 15:27, Ron Michael a écrit : Hi all, can anyone please tell me what is the key-word to clear the screen? I am aware of the cont+L, however I need some R-syntax, that can be typed into the

Re: [R] relative risk regression with survey data

2010-09-15 Thread Ravi Varadhan
Dear Thomas, You said, the log-binomial model is very non-robust when the fitted values get close to 1, and there is some controversy over the best approach. Could you please point me to a paper that discusses the issues? I have written some code to do maximum likelihood estimation for relative,

Re: [R] Keyword to clear the screen

2010-09-15 Thread Henrique Dallazuanna
Try this (for windows): clear - function() { library(RDCOMClient) ws - COMCreate(WScript.Shell) invisible(ws$SendKeys('^L')) } On Wed, Sep 15, 2010 at 10:27 AM, Ron Michael ron_michae...@yahoo.comwrote: Hi all, can anyone please tell me what is the key-word to clear the screen? I

[R] help for shift.down

2010-09-15 Thread Malangi Chikkalingaiah, Ramya
Hi all, I created a matrix by parsing a csv file when I shift rows I am getting the wrong output as below my matrix has single column with multiple rows but it is splitting into multiple columns and not shifting row wise also can you please resolve this issue CMA1-function() { PMA3-

Re: [R] Keyword to clear the screen

2010-09-15 Thread Ron Michael
Thanks everyone who have looked into my problem. In the mean time I already found one tip here http://onertipaday.blogspot.com/2007/05/how-to-clear-screen-in-r.html to do that. I am yet to try it...perhaps it would solve me problem :)   Thanks, --- On Wed, 15/9/10, Ron Michael

[R] Re : content analysis

2010-09-15 Thread Sametrie Neurones
Bob, Thank you very much for your help. I found TM and Readme. I am going to look into Tau and rattle right now. Thanks, Christian De : Bob Green bgr...@dyson.brisnet.org.au À : r-help@r-project.org Cc : Sametrie Neurones neuro...@ymail.com Envoyé le : Mer

Re: [R] About choosing file

2010-09-15 Thread Stephen Liu
Hi Uwe, (assuming R-2.11.1) Yes Test01=read.table(file.choose(), header=TRUE) Enter file name: My problem here is ; the file is NOT on /home/user directory. I need to browse for it. list.files() [1] boxplot.pdf Desktop FourPlots01.png hist.png [5] jranke_cran.asc M-x R

Re: [R] assignment by value or reference

2010-09-15 Thread Xiaobo Gu
Thanks. Xiaobo.Gu -Original Message- From: Uwe Ligges [mailto:lig...@statistik.tu-dortmund.de] Sent: Wednesday, September 15, 2010 5:06 PM To: Xiaobo Gu Cc: r-help@r-project.org; '顾小波' Subject: Re: [R] assignment by value or reference See the R Language Definition manual. Since R

Re: [R] About choosing file

2010-09-15 Thread Uwe Ligges
You can specify an absolute or relative path (relative to the current directory) of course. Uwe On 15.09.2010 16:03, Stephen Liu wrote: Hi Uwe, (assuming R-2.11.1) Yes Test01=read.table(file.choose(), header=TRUE) Enter file name: My problem here is ; the file is NOT on /home/user

Re: [R] About choosing file

2010-09-15 Thread Henrique Dallazuanna
You can try tcltk: library(tcltk) tk_choose.files() On Wed, Sep 15, 2010 at 11:03 AM, Stephen Liu sati...@yahoo.com wrote: Hi Uwe, (assuming R-2.11.1) Yes Test01=read.table(file.choose(), header=TRUE) Enter file name: My problem here is ; the file is NOT on /home/user directory. I

[R] Odp: Programming: loop versus vector oriented

2010-09-15 Thread Petr PIKAL
Hi I do not want to go too much deep to internals of your function. What do you suppose to get as the result. If you want to get results of your function for a vector of reynolds and dk you can use function outer and probably get rid of for cycle in the function. outer(c(100, 530,2410),

[R] Creating publication-quality plots for use in Microsoft Word

2010-09-15 Thread dadrivr
Hi everyone, I am trying to make some publication-quality plots for use in Microsoft Word, but I am having trouble creating high-quality plots that are supported by Microsoft Word. If I use the R plot function to create the figure, the lines are jagged, and the picture is not of high quality

Re: [R] Creating publication-quality plots for use in Microsoft Word

2010-09-15 Thread Bryan Hanson
There's many ways to solve this, but you are close to one already: Make the pdf, put the cursor where you want it in the document, then on the menu bar Insert -- Picture -- From File... And navigate to the file. This works on the Mac, and seems to store the picture internally in a different way

Re: [R] Creating publication-quality plots for use in Microsoft Word

2010-09-15 Thread Gabor Grothendieck
On Wed, Sep 15, 2010 at 10:38 AM, dadrivr dadr...@gmail.com wrote: Hi everyone, I am trying to make some publication-quality plots for use in Microsoft Word, but I am having trouble creating high-quality plots that are supported by Microsoft Word. If I use the R plot function to create the

Re: [R] Creating publication-quality plots for use in Microsoft Word

2010-09-15 Thread Marc Schwartz
That approach will be unique to OSX, upon which PDF is a default format. You can copy and paste from a PDF document using Preview into Office or iWork or similar apps. However, when subsequently displaying that content on a non-OSX system, the content will be shown as a bitmap not as the vector

[R] Contour line coordinates

2010-09-15 Thread Tonja Krueger
Hi all, I used contour() to add contour lines to a plot. Now I’m wondering if there is a way to get an output of the calculated x- and y- coordinates of the contour lines? Tonja __ R-help@r-project.org mailing list

Re: [R] About choosing file

2010-09-15 Thread Stephen Liu
Hi Henrique, Thanks for your advice which works for me. B.R. Stephen L From: Henrique Dallazuanna www...@gmail.com Cc: R-help@r-project.org Sent: Wed, September 15, 2010 10:24:01 PM Subject: Re: [R] About choosing file You can try tcltk: library(tcltk)

Re: [R] Package build and install under Windows

2010-09-15 Thread Tao
Thanks. It seems that both Rtools210.exe and Rtools211.exe support R 1.10.x, which one is better for R 2.10.1. -- View this message in context: http://r.789695.n4.nabble.com/Package-build-and-install-under-Windows-tp2539509p2540713.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Contour line coordinates

2010-09-15 Thread David Winsemius
On Sep 15, 2010, at 11:13 AM, Tonja Krueger wrote: Hi all, I used contour() to add contour lines to a plot. Now I’m wondering if there is a way to get an output of the calculated x- and y- coordinates of the contour lines? ?contourLines # as was suggested to be the first See(n) Also

[R] characters in a string

2010-09-15 Thread raje...@cse.iitm.ac.in
Hi, I need to check if a string rha,b,c,drh is delimited by two rh 's as efficiently as possible(I need to do this a lot of times) and return TRUE. Can someone suggest a good technique? [[alternative HTML version deleted]] __

Re: [R] Contour line coordinates

2010-09-15 Thread Duncan Murdoch
On 15/09/2010 11:13 AM, Tonja Krueger wrote: Hi all, I used contour() to add contour lines to a plot. Now I’m wondering if there is a way to get an output of the calculated x- and y- coordinates of the contour lines? ?contourLines Duncan Murdoch

Re: [R] Creating publication-quality plots for use in Microsoft Word

2010-09-15 Thread dadrivr
Thanks for your help, guys. I'm looking to produce a high-quality plot (no jagged lines or other distortions) with a filetype that is accepted by Microsoft Word on a PC and that most journals will accept. That's why I'd prefer to stick with JPEG, TIFF, PNG, or the like. I'm not sure EPS would

[R] symmetric dotplot? (Wilkinson 1999, Am Stat 53 (3) 276-281

2010-09-15 Thread Paul Artes
DeaR all, The stripchart function (graphics) is provides jittered and stacked univariate scatterplots, but I wonder if anyone has implemented a *symmetric* version of this - as in the lower panel of Wilkinson's paper: http://www.jstor.org/stable/2686111 I have looked through several functions

Re: [R] multiple cores/building fails

2010-09-15 Thread Gregory Ryslik
Hi, That seems to be the case. Is there a way that I can put an object in some global place where all the workers can access it? Doing the following at the start (before I make multiple workers) does not work: Assign('global.control', control, globalenv()) Thanks for your help! Kind regards,

Re: [R] characters in a string

2010-09-15 Thread Marc Schwartz
On Sep 15, 2010, at 10:16 AM, raje...@cse.iitm.ac.in wrote: Hi, I need to check if a string rha,b,c,drh is delimited by two rh 's as efficiently as possible(I need to do this a lot of times) and return TRUE. Can someone suggest a good technique? See ?grep and ?regex grepl(^rh.*rh$,

Re: [R] characters in a string

2010-09-15 Thread Romain Francois
Le 15/09/10 17:16, raje...@cse.iitm.ac.in a écrit : Hi, I need to check if a string rha,b,c,drh is delimited by tworh 's as efficiently as possible(I need to do this a lot of times) and return TRUE. Can someone suggest a good technique? Hi Rajesh, f - function( x ) grepl( ^rh.*rh$, x )

Re: [R] Creating publication-quality plots for use in Microsoft Word

2010-09-15 Thread Gabor Grothendieck
On Wed, Sep 15, 2010 at 11:25 AM, dadrivr dadr...@gmail.com wrote: Thanks for your help, guys.  I'm looking to produce a high-quality plot (no jagged lines or other distortions) with a filetype that is accepted by Microsoft Word on a PC and that most journals will accept.  That's why I'd

Re: [R] characters in a string

2010-09-15 Thread David Winsemius
On Sep 15, 2010, at 11:16 AM, raje...@cse.iitm.ac.in wrote: Hi, I need to check if a string rha,b,c,drh is delimited by two rh 's as efficiently as possible(I need to do this a lot of times) and return TRUE. Can someone suggest a good technique? txt - rha,b,c,drh grep(^rh.+rh$, txt)

Re: [R] Creating publication-quality plots for use in Microsoft Word

2010-09-15 Thread Marc Schwartz
On Sep 15, 2010, at 10:25 AM, dadrivr wrote: Thanks for your help, guys. I'm looking to produce a high-quality plot (no jagged lines or other distortions) with a filetype that is accepted by Microsoft Word on a PC and that most journals will accept. That's why I'd prefer to stick with

Re: [R] Creating publication-quality plots for use in Microsoft Word

2010-09-15 Thread Thomas Lumley
On Wed, 15 Sep 2010, dadrivr wrote: Thanks for your help, guys. I'm looking to produce a high-quality plot (no jagged lines or other distortions) with a filetype that is accepted by Microsoft Word on a PC and that most journals will accept. That's why I'd prefer to stick with JPEG, TIFF,

Re: [R] relative risk regression with survey data

2010-09-15 Thread Thomas Lumley
On Wed, 15 Sep 2010, Ravi Varadhan wrote: Dear Thomas, You said, the log-binomial model is very non-robust when the fitted values get close to 1, and there is some controversy over the best approach. Could you please point me to a paper that discusses the issues? I have written some code to

[R] Difficulty creating Julian day in data frame

2010-09-15 Thread Sean Parks
Hi, I'm attempting to add a Julian Day column to a data frame. Here is my code and the resulting data frame: vic.data - read.table(C:/VIC/data/vic.data.csv, header=F) names(vic.data) - c(year, month, day, precip, evap, runoff, baseflow, Tsup, SM1, SM2, SM3, SWE)

[R] Scripting help

2010-09-15 Thread Ayyappa Chaturvedula
Dear all, I am new to R and this group. I have good experience in S scripts. I need some orientation on data imports, general plotting functions. Can you please direct me? Regards,Ayyappa Chaturvedula __ R-help@r-project.org mailing list

Re: [R] Difficulty creating Julian day in data frame

2010-09-15 Thread David Winsemius
On Sep 15, 2010, at 12:05 PM, Sean Parks wrote: Hi, I'm attempting to add a Julian Day column to a data frame. Here is my code and the resulting data frame: vic.data - read.table(C:/VIC/data/vic.data.csv, header=F) names(vic.data) - c(year, month, day, precip, evap, runoff,

Re: [R] characters in a string

2010-09-15 Thread raje...@cse.iitm.ac.in
great! Thanks - Original Message - From: David Winsemius dwinsem...@comcast.net To: raje...@cse.iitm.ac.in Cc: r-help r-help@r-project.org Sent: Wed, 15 Sep 2010 21:12:27 +0530 (IST) Subject: Re: [R] characters in a string On Sep 15, 2010, at 11:16 AM, raje...@cse.iitm.ac.in wrote:

[R] Computing effect sizes based on mixed models

2010-09-15 Thread Andrea Meyer
In an intervention study with subjects randomly allocated to two treatments (treat A and B) and three time points (time) plus an additional baseline measurement (dv_base), I've set up the following model to test for differences in temporal courses of treatments for the outcome (dv), thereby

Re: [R] Difficulty creating Julian day in data frame

2010-09-15 Thread David Winsemius
On Sep 15, 2010, at 12:23 PM, David Winsemius wrote: On Sep 15, 2010, at 12:05 PM, Sean Parks wrote: Hi, I'm attempting to add a Julian Day column to a data frame. Here is my code and the resulting data frame: vic.data - read.table(C:/VIC/data/vic.data.csv, header=F)

Re: [R] How to uncompress a gz file in R

2010-09-15 Thread Wonsang You
Dear Henrik, Thank you so much for your kind help. Unfortunately, I could not find out any function such as 'gunzip' in R.utils package. Instead, I could be successful by using the following command. system(gunzip filename) On the other hand, the function 'gzfile' supports the compression as gz

Re: [R] Creating publication-quality plots for use in Microsoft Word

2010-09-15 Thread Max Kuhn
You might want to check out the Reproducible Research task view: http://cran.r-project.org/web/views/ReproducibleResearch.html There is a section on Microsoft formats, as well as other formats that can be converted. Max On Wed, Sep 15, 2010 at 11:49 AM, Thomas Lumley

Re: [R] Creating publication-quality plots for use in Microsoft Word

2010-09-15 Thread Mark Difford
I'd prefer to stick with JPEG, TIFF, PNG, or the like. I'm not sure EPS would fly. Preferring to stick with bitmap formats (like JPEG, TIFF, PNG) is likely to give you the jagged lines and other distortions you profess to want to avoid. EPS (encapsulated postscript, which handles

[R] Format Data Issue??

2010-09-15 Thread Randy Cass
R Users, I am new to R and have tried to figure out how to automate this process instead of using excel. I have read in this dataframe into r with read.table. I need to reshape the data from the first table into the format of the second table. TractID StandID Species CruiseDate DBHClass

Re: [R] How to uncompress a gz file in R

2010-09-15 Thread Henrik Bengtsson
Hi. On Wed, Sep 15, 2010 at 9:30 AM, Wonsang You y...@ifn-magdeburg.de wrote: Dear Henrik, Thank you so much for your kind help. Unfortunately, I could not find out any function such as 'gunzip' in R.utils package. Hmm... it's been there since at least 2005. library(R.utils); help(gunzip)

[R] Sas to R

2010-09-15 Thread Sarah Jilani
Hi, I need to call an R program from Sas. I have tried using the following code in Sas using the x command but it just calls up dos and says 'D:\Program' is not recognized as an internal or external command, operable program or batch file. ] SAS CODE: options xwait xsync; %let

Re: [R] Scripting help

2010-09-15 Thread Philipp Pagel
On Wed, Sep 15, 2010 at 12:22:15PM -0400, Ayyappa Chaturvedula wrote: Dear all, I am new to R and this group. I have good experience in S scripts. I need some orientation on data imports, general plotting functions. Can you please direct me? Welcome to R. Coming from an S background you

Re: [R] Sas to R

2010-09-15 Thread Erik Iverson
Sarah, This is a SAS question, not R. However, it seems clear that it has something to do with the fact that there are spaces in the command that you're sending to Windows. Maybe try calling with the 'short directory name' notation, I forget what that's called in Windows. Or else follow-up on

Re: [R] Sas to R

2010-09-15 Thread Erik Iverson
David Winsemius wrote: On Sep 15, 2010, at 1:44 PM, Sarah Jilani wrote: Hi, I need to call an R program from Sas. I have tried using the following code in Sas using the x command but it just calls up dos and says I went searching for a worked example and found this:

Re: [R] Sas to R

2010-09-15 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Sarah Jilani Sent: Wednesday, September 15, 2010 10:44 AM To: r-help@r-project.org Subject: [R] Sas to R Hi, I need to call an R program from Sas. I have tried using the

Re: [R] Sas to R

2010-09-15 Thread Joshua Wiley
Hi Sarah, Just a couple additional notes to what's been said: 1) It seems like R CMD BATCH might be easier 2) If the space in Program Files is causing issues, you can use the Windows environment variable %PROGRAMFILES% (which also means you do not need the drive letter. 3) I find it handy to

Re: [R] Sas to R

2010-09-15 Thread Sarah Jilani
Thanks Josh and Dan! I got it to work using the following code that Dan had suggested. x D:\Program Files\R\R-2.9.2\bin\R.exe --no-save --quiet rsource.\Rtest.R rsource.\Rtest.log; Thanks for your help!! :) Sarah On Wed, Sep 15, 2010 at 2:58 PM, Joshua Wiley jwiley.ps...@gmail.comwrote:

Re: [R] Homogeneity of regression slopes

2010-09-15 Thread Doug Adams
That's good insight, and gives me some good ideas for what direction to this. Thanks everyone ! Doug P.S. - I guess if you have a significant interaction, that implies the slopes of the individual regression lines are significantly different anyway, doesn't it... On Tue, Sep 14, 2010 at

[R] test to see if a s4 property is assigned?

2010-09-15 Thread darckeen
Class(person,representation(age=numeric,weight=numeric)) [1] person bob - new(person,age=30) is.null(b...@weight) [1] FALSE b...@weight numeric(0) b...@weight == numeric(0) logical(0) How can i test to see if a s4 property is assigned? -- View this message in context:

Re: [R] Format Data Issue??

2010-09-15 Thread Dennis Murphy
Hi: This isn't the most elegant way, I'm sure, but here's one approach. library(reshape) # read in your data...I had to surround the text strings with quotes because of the spaces df - read.table(textConnection( TractID StandID Species CruiseDate DBHClassTreesPerAcre 'Carbon Stand'

  1   2   >