Re: [R] Querying the path separator?

2011-06-28 Thread Berend Hasselman
Jonathan Greenberg wrote: > > The problem is that I'm trying to create a path to use with a system() > call, and the command window will not work with the forward slash, > only with the standard backslash. I do understand that within R it > will work with either way, but not via the system call.

Re: [R] R-Installation on Unix -- "Make: Don't know how to make #. Stop."

2011-06-28 Thread Prof Brian Ripley
(a) Most likely you need GNU make: what are you using? (See the 'R Installation and Administration' manual.) This does not look like normal GNU make (which does not call itself 'Make'). (b) R-devel is the list for such questions: see the posting guide. On Tue, 28 Jun 2011, Zhou, Hong wrote:

Re: [R] Querying the path separator?

2011-06-28 Thread Jonathan Greenberg
The problem is that I'm trying to create a path to use with a system() call, and the command window will not work with the forward slash, only with the standard backslash. I do understand that within R it will work with either way, but not via the system call. I'm trying to create a "generic" sys

Re: [R] Querying the path separator?

2011-06-28 Thread Jeff Newmiller
Windows will work with either separator. --- Jeff Newmiller The . . Go Live... DCN: Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/Batteries O.O#. #.O#. with /Software/Embedded C

Re: [R] Derivative of a function

2011-06-28 Thread Rolf Turner
(1) You really ought to do your own homework. (2) What has this to do with R? cheers, Rolf Turner On 29/06/11 14:03, Lisa wrote: Dear all, I just want to get the derivative of a function that looks like: y = exp(x1*b) / (exp(x1*b) + exp(x2*b)) where y is a scalar, x1, x2, and

Re: [R] Querying the path separator?

2011-06-28 Thread Jonathan Greenberg
Thanks Henrik, but as the help for this function states: Note The components are separated by / (not \) on Windows. , the slashes it uses are incorrect for use in a CMD window on a Windows box (they need to be \ but file.path uses /). I suppose I can do a query as to whether the platform is Wind

[R] Derivative of a function

2011-06-28 Thread Lisa
Dear all, I just want to get the derivative of a function that looks like: y = exp(x1*b) / (exp(x1*b) + exp(x2*b)) where y is a scalar, x1, x2, and b are vectors. I am going to take the derivative of b with respect to y, but I cannot derive an expression in which b is function of y. I know there

Re: [R] library(doBy) will not load

2011-06-28 Thread Tyler Rinker
Problem solved. I lazily forgot to clean up my workspace with rm(list=ls()). A good reminder to do so after each exit. Sorry for the wasted server space. From: tyler_rin...@hotmail.com To: r-help@r-project.org Date: Tue, 28 Jun 2011 22:58:47 -0400 Subject: Re: [R] library(doBy) will not loa

Re: [R] library(doBy) will not load

2011-06-28 Thread Tyler Rinker
This is the error I get when I try to load snow. > library(snow) Error in as.character(t) : 't' is missing Error in library(snow) : .First.lib failed for ‘snow’ From: tyler_rin...@hotmail.com To: r-help@r-project.org Date: Tue, 28 Jun 2011 22:47:06 -0400 Subject: [R] library(doBy) will not lo

[R] library(doBy) will not load

2011-06-28 Thread Tyler Rinker
Greetings R Community, One of my favorite packages won't load and I'm not sure why. It loaded earlier today. The problem appears with the snow package, which doBy requires. I tried reinstalling both packages again ,shutting [R] down, reinstalling [R] in the workspace (shortcut). Here's the

Re: [R] Confidence interval from resampling

2011-06-28 Thread Rolf Turner
On 24/06/11 01:44, Adriana Bejarano wrote: Dear R gurus, I have the following code, but I still not know how to estimate and extract confidence intervals (95%CI) from resampling. Some sound advice --- still sound after all these years I believe --- in respect of boot strap confidence inter

Re: [R] a Weighted Least Square Model for a Binary Outcome

2011-06-28 Thread Daniel Malter
You can specify the weights=... argument in the lm() function as vector of weights, one for each observation. Should that not do what your are trying to do? HTH, Daniel -- View this message in context: http://r.789695.n4.nabble.com/a-Weighted-Least-Square-Model-for-a-Binary-Outcome-tp3631551p363

Re: [R] Indexing to Insert values from a dataframe into a matrix

2011-06-28 Thread Daisy Englert Duursma
Thanks, that worked like a charm. Daisy On Wed, Jun 29, 2011 at 11:47 AM, David Winsemius wrote: > > On Jun 28, 2011, at 9:18 PM, Daisy Englert Duursma wrote: > >> Hello, >> >> I think this is a simple problem but I am not coming up with a simple >> solution. I think it just an indexing problem.

Re: [R] Querying the path separator?

2011-06-28 Thread Henrik Bengtsson
See file.path(). /Henrik On Tue, Jun 28, 2011 at 6:59 PM, Jonathan Greenberg wrote: > Hopefully this is a pretty easy fix -- I need to have R query the path > separator for some code I'm trying to write (it involves using a > system() call) -- the call requires a path and a wildcard, e.g.: > > c

[R] Querying the path separator?

2011-06-28 Thread Jonathan Greenberg
Hopefully this is a pretty easy fix -- I need to have R query the path separator for some code I'm trying to write (it involves using a system() call) -- the call requires a path and a wildcard, e.g.: command="mycommand /path/to/*.files" in the case of unix or, command="mycommand.exe C:\\path\\to\

Re: [R] Indexing to insert values from a dataframe into a matrix

2011-06-28 Thread Jeff Newmiller
A) Relying on floating point numbers for predictable indexing is a recipe for failure. Convert your floating point numbers to integers before using them to index. B) Row and column labels are strings, and you are giving numerics to the brackets. You would need to use as.character() on ddr$x and

Re: [R] Indexing to Insert values from a dataframe into a matrix

2011-06-28 Thread David Winsemius
On Jun 28, 2011, at 9:18 PM, Daisy Englert Duursma wrote: Hello, I think this is a simple problem but I am not coming up with a simple solution. I think it just an indexing problem. I can easily replace values in a matrix from a dataframe when the dataframe has row and column numbers. In the

[R] Indexing to insert values from a dataframe into a matrix

2011-06-28 Thread Daisy Englert Duursma
Hello, I think this is a simple problem but I am not coming up with a simple solution. I think it just an indexing problem. I can easily replace values in a matrix from a dataframe when the dataframe has row and column numbers. In the example below I use row and column names and  I can not get it

[R] Indexing to Insert values from a dataframe into a matrix

2011-06-28 Thread Daisy Englert Duursma
Hello, I think this is a simple problem but I am not coming up with a simple solution. I think it just an indexing problem. I can easily replace values in a matrix from a dataframe when the dataframe has row and column numbers. In the example below I use row and column names and I can not get it

Re: [R] Extract elements from objects in a list

2011-06-28 Thread Jeremy Miles
Excellent, thanks. On 28 June 2011 16:36, jim holtman wrote: > forgot to sent the sapply solution: > >> sapply(x, '[', 3) > Median Median Median Median Median Median Median Median Median Median > Median Median Median Median Median Median > 0.4769 0.4880 0.4916 0.4021 0.4474 0.4449 0.5169 0.5067 0

Re: [R] Error: cannot allocate vector of size

2011-06-28 Thread jim holtman
Assuming that your column are numeric, you would need 4GB of memory just to store one copy of the object. If this is 5 years, then you would need almost 1GB for a copy, but the processing probably will use up twice as much as it is processing. Try reading a month's worth and see how much you use.

Re: [R] Extract elements from objects in a list

2011-06-28 Thread jim holtman
forgot to sent the sapply solution: > sapply(x, '[', 3) Median Median Median Median Median Median Median Median Median Median Median Median Median Median Median Median 0.4769 0.4880 0.4916 0.4021 0.4474 0.4449 0.5169 0.5067 0.5189 0.4088 0.4887 0.5392 0.4964 0.4141 0.5155 0.4461 Median Median Medi

Re: [R] Extract elements from objects in a list

2011-06-28 Thread jim holtman
single brackets: > x <- as.list(100) > for(loop in c(1:100)) { + x[[loop]] <- summary(runif(100)) + } > x[[1]][1] Min. 0.007595 > x[[1]][3] Median 0.4769 > On Tue, Jun 28, 2011 at 7:22 PM, Jeremy Miles wrote: > Hi All, > > I want to extract elements of elements in a list. >

Re: [R] Extract elements from objects in a list

2011-06-28 Thread Bill.Venables
> x <- lapply(1:100, function(x) summary(runif(100))) > head(x, 4) [[1]] Min. 1st Qu. MedianMean 3rd Qu.Max. 0.02922 0.38330 0.58120 0.58230 0.83430 0.99870 [[2]] Min. 1st Qu. Median Mean 3rd Qu. Max. 0.004903 0.281400 0.478900 0.497100 0.729900 0.990700 [[3]]

[R] Extract elements from objects in a list

2011-06-28 Thread Jeremy Miles
Hi All, I want to extract elements of elements in a list. Here's an example of what I mean: If I create a list: x <- as.list(100) for(loop in c(1:100)) { x[[loop]] <- summary(runif(100)) } > head(x) [[1]] Min. 1st Qu. MedianMean 3rd Qu.Max. 0.02271 0.25260 0.58130

Re: [R] Running R from windows command prompt

2011-06-28 Thread Michael Sumner
On Wed, Jun 29, 2011 at 1:51 AM, Robert Baer wrote: > Subject: Re: [R] Running R from windows command prompt > > --- > Actually, you can 'cut and paste' from at Windows Cmd prompt.  It is done by > clicking the > C: icon in the upper left of the command window, choosing edit, and

Re: [R] plotting survival curves with model parameters

2011-06-28 Thread David Winsemius
On Jun 28, 2011, at 6:26 PM, David Winsemius wrote: On Jun 28, 2011, at 5:46 PM, Trey Batey wrote: Hello. I am trying to write an R function to plot the survival function (and associated hazard and density) for a Siler competing hazards model. This model is similar to the Gompertz-Makeham,

Re: [R] plotting survival curves with model parameters

2011-06-28 Thread David Winsemius
On Jun 28, 2011, at 5:46 PM, Trey Batey wrote: Hello. I am trying to write an R function to plot the survival function (and associated hazard and density) for a Siler competing hazards model. This model is similar to the Gompertz-Makeham, with the addition of a juvenile component that includes

[R] plotting survival curves with model parameters

2011-06-28 Thread Trey Batey
Hello. I am trying to write an R function to plot the survival function (and associated hazard and density) for a Siler competing hazards model. This model is similar to the Gompertz-Makeham, with the addition of a juvenile component that includes two parameters---one that describes the initial in

[R] a Weighted Least Square Model for a Binary Outcome

2011-06-28 Thread Vivian Zhuang
Dear R Users, I am new to the mailing list. I posted this message about two hours ago but did not receive it through the list, so I am posting it again. Sorry for duplicates. I would like to use R to fit a Weighted Least Square model for a binary outcome, say Y. The model is the one widely used

Re: [R] connecting R and PostgreSQL

2011-06-28 Thread Steven Kennedy
I use RODBC and have got it to work fine on Windows, Linux and Mac. There's some basic info here, and plenty of blog posts out there with step by step instructions for the different OS's. http://hosho.ees.hokudai.ac.jp/~kubo/Rdoc/library/RODBC/html/00Index.html On Tue, Jun 28, 2011 at 11:53 PM

Re: [R] Question about error message

2011-06-28 Thread Duncan Murdoch
On 11-06-28 4:22 PM, David Kaplan wrote: Greetings, I'm getting this error message using Joe Shafer's "NORM" package. Error in storage.mode(x)<- "double" : (list) object cannot be coerced to type 'double' I'm not sure what this means. It means just what it says, but fixing it is another

Re: [R] Separator of data

2011-06-28 Thread Trying To learn again
MAny Thanks¡¡¡ 2011/6/28 jim holtman > try this: > > > x <- read.fwf(textConnection("188556644 > + 225588666 > + 55555"), width = rep(1,9)) > > > > x > V1 V2 V3 V4 V5 V6 V7 V8 V9 > 1 1 8 8 5 5 6 6 4 4 > 2 2 2 5 5 8 8 6 6 6 > 3 5 5 8 8 8 8 5 5 5 > > > > > On Tue,

Re: [R] Error: cannot allocate vector of size

2011-06-28 Thread xin123620
Thank you Jholtman. Now count is 46001902. I was trying to retrieve one-year data, but I still receive the following message: "Error: cannot allocate vector of size 64.0 Mb" -- View this message in context: http://r.789695.n4.nabble.com/Error-cannot-allocate-vector-of-size-tp3629384p3631354.html

Re: [R] create a factor variable from two numeric variables when order is irrelevant

2011-06-28 Thread David Winsemius
On Jun 28, 2011, at 4:53 PM, David Winsemius wrote: On Jun 28, 2011, at 3:59 PM, Daniel Malter wrote: Hi all, I have two numeric variables that form combinations in a matched sample. Let's say I have five levels of x and y. What I am seeking to create is a factor variable that ignores t

Re: [R] create a factor variable from two numeric variables when order is irrelevant

2011-06-28 Thread David Winsemius
On Jun 28, 2011, at 3:59 PM, Daniel Malter wrote: Hi all, I have two numeric variables that form combinations in a matched sample. Let's say I have five levels of x and y. What I am seeking to create is a factor variable that ignores the order of x and y, i.e., the factor should indicate

[R] Question about error message

2011-06-28 Thread David Kaplan
Greetings, I'm getting this error message using Joe Shafer's "NORM" package. Error in storage.mode(x) <- "double" : (list) object cannot be coerced to type 'double' I'm not sure what this means. I get this message when running s <- prelim.norm(filename) prelim.norm is used to develop so

Re: [R] Error: cannot allocate vector of size

2011-06-28 Thread jim holtman
select count(*) from yourData On Tue, Jun 28, 2011 at 3:07 PM, xin123620 wrote: > Thank you Jeff. You are absolutely right. I just edited the R and computer > info in: R is 32 bit; computer is his computer is Windows XP, 32bit Intel(R) > Core(TM) e8...@3.ghz, 2.99GHz, 2.95GB of RAM. > > The data

Re: [R] Separator of data

2011-06-28 Thread jim holtman
try this: > x <- read.fwf(textConnection("188556644 + 225588666 + 55555"), width = rep(1,9)) > > x V1 V2 V3 V4 V5 V6 V7 V8 V9 1 1 8 8 5 5 6 6 4 4 2 2 2 5 5 8 8 6 6 6 3 5 5 8 8 8 8 5 5 5 > On Tue, Jun 28, 2011 at 3:47 PM, Trying To learn again wrote: >  Hi all, >

[R] create a factor variable from two numeric variables when order is irrelevant

2011-06-28 Thread Daniel Malter
Hi all, I have two numeric variables that form combinations in a matched sample. Let's say I have five levels of x and y. What I am seeking to create is a factor variable that ignores the order of x and y, i.e., the factor should indicate x=1, y=5, as the same factor as x=5, y=1. Obviously, this b

Re: [R] Separator of data

2011-06-28 Thread David Winsemius
On Jun 28, 2011, at 3:56 PM, David Winsemius wrote: On Jun 28, 2011, at 3:47 PM, Trying To learn again wrote: Hi all, I have a matrix like this: 188556644 225588666 55555 I try to read the table using read table but if I put sep="" I have seen it expects a white space, is there a "s

Re: [R] Separator of data

2011-06-28 Thread David Winsemius
On Jun 28, 2011, at 3:47 PM, Trying To learn again wrote: Hi all, I have a matrix like this: 188556644 225588666 55555 I try to read the table using read table but if I put sep="" I have seen it expects a white space, is there a "sep" option to read this matrix so each single number

Re: [R] Separator of data

2011-06-28 Thread Ben Bolker
Trying To learn again gmail.com> writes: > 188556644 > 225588666 > 55555 > > I try to read the table using read table but if I put sep="" I have seen it > expects a white space, is there a "sep" option to read this matrix so > each single number is a position of the matrix ?read.fwf, I

[R] Separator of data

2011-06-28 Thread Trying To learn again
Hi all, I have a matrix like this: 188556644 225588666 55555 I try to read the table using read table but if I put sep="" I have seen it expects a white space, is there a "sep" option to read this matrix so each single number is a position of the matrix You see this matrix would be an 3x9

[R] parallel computing with 'foreach'

2011-06-28 Thread Stacey Wood
Hi all, I would like to parallelize some R code and would like to use the 'foreach' package with a foreach loop. However, whenever I call a function from an enabled package outside of MASS, I get an error message that a number of the functions aren't recognized (even though the functions should be

Re: [R] Error: cannot allocate vector of size

2011-06-28 Thread xin123620
Thank you Jeff. You are absolutely right. I just edited the R and computer info in: R is 32 bit; computer is his computer is Windows XP, 32bit Intel(R) Core(TM) e8...@3.ghz, 2.99GHz, 2.95GB of RAM. The data I am trying to retrieve is through postgre from a university server. I checked the postgre

Re: [R] Loop through each subject

2011-06-28 Thread StellathePug
> for (i in 1:(dat[(unique(dat$Subject)),)] I don't think the order of the parentheses when you open the loop is correct. You have four (s and only three )s. Plus the brackets (square parentheses) seem so be out of order too. If you use RStudio to write your code, when you highlight a parenthe

[R] Testing the proportional odds assumption of an ordinal generalized estimating equations (GEE) regression model

2011-06-28 Thread Andreas Karlsson
Dear list members, I am estimating an ordinal generalized estimating equations (GEE) regression model on repeated measurements data. Is there any way (preferably in R) to test the proportional odds assumption of this model? Thanks in advance. Andreas

[R] Weighted Least Square Model for a Binary Outcome

2011-06-28 Thread Vivian Zhuang
Dear R Users, I would like to use R to fit a Weighted Least Square model for a binary outcome, say Y. The model is the one widely used for a binary dependent variable when the logistic model has not been proposed. Does anyone know how to specify the weight as the square root of 1/(E(Y)(1-E(Y)) i

[R] indexing with which, logical indexing, and missing values

2011-06-28 Thread Juliet Hannah
I have a data frame in which missing values exist, and I need to recode the string "missing" to a missing value. For the example, let's assume I cannot do this while reading it in. Even though this has been discussed extensively, I'm still a little confused about when to index with "which" and when

Re: [R] how to print "<=" in plot title

2011-06-28 Thread array chip
Thank you again David for the thoughtful comments on plotmath. Really appreciated. John - Original Message From: David Winsemius To: array chip Cc: Peter Ehlers ; R Sent: Tue, June 28, 2011 12:20:49 PM Subject: Re: [R] how to print "<=" in plot title On Jun 28, 2011, at 2:52 PM,

Re: [R] Loop through each subject

2011-06-28 Thread David Winsemius
On Jun 28, 2011, at 2:51 PM, Edward Patzelt wrote: Huh, not sure I understand your feedback. There is only 1 file that is 1 large dataframe. I want to execute the commands on each subject in the dataframe and ouput their respective files with the subject # and file type appended (10_gre

Re: [R] R-Installation on Unix -- "Make: Don't know how to make #. Stop."

2011-06-28 Thread Ben Bolker
Zhou, Hong email.chop.edu> writes: > ./configure was run successfully on my HP-UX ia64 server with exit=0, > but when type make at prompt, get this > error "Make: Don't know how to make #. Stop." Does anyone has > any clues about this message? Thank you very much! > #make > Rmath.h is unchang

Re: [R] how to print "<=" in plot title

2011-06-28 Thread David Winsemius
On Jun 28, 2011, at 2:52 PM, array chip wrote: Thank you David for the obvious fix and sorry for my lacking innovative spirit, :-) Really, I know I haven't grasped the essence of plotting these math symbols in R. A lot of people (including me) have had trouble understanding to to writ

Re: [R] means and error bars on xyplot for binary data

2011-06-28 Thread Peter Ehlers
On 2011-06-28 00:12, Louis Plough wrote: Hi, I have binary (0,1) data for a trait as my response variable, and a dependent variable, genotype, with three classes (AA, AB, BB). I would like to plot this data so that across the three genoytpes, even though the points are all either 0 or 1, i want

Re: [R] how to print "<=" in plot title

2011-06-28 Thread array chip
Thank you David for the obvious fix and sorry for my lacking innovative spirit, :-) Really, I know I haven't grasped the essence of plotting these math symbols in R. John - Original Message From: David Winsemius To: array chip Cc: Peter Ehlers ; R Sent: Tue, June 28, 2011 11:50:0

Re: [R] Loop through each subject

2011-06-28 Thread Edward Patzelt
Huh, not sure I understand your feedback. There is only 1 file that is 1 large dataframe. I want to execute the commands on each subject in the dataframe and ouput their respective files with the subject # and file type appended (10_green.txt). How would I do this loop index? - Show quoted text

Re: [R] how to print "<=" in plot title

2011-06-28 Thread David Winsemius
On Jun 28, 2011, at 2:42 PM, array chip wrote: David, I tried your suggestion, still not working: x<-3 plot(1:10) title(bquote(bold(x) <= bold(as.character(.(x)) ))) It prints x<=as.character(3) as title Kids these days! No innovative spirit. Why in my day... they would be jumping with

Re: [R] cumulative incidence plot vs survival plot

2011-06-28 Thread array chip
Thank you Alan again! Hope you could also share your thought on my another email about the coding of censoring before death.. Thanks again! John - Original Message From: alanm (Alan Mitchell) To: array chip ; David Winsemius Cc: r-help@r-project.org Sent: Tue, June 28, 2011 11:4

Re: [R] how to print "<=" in plot title

2011-06-28 Thread array chip
David, I tried your suggestion, still not working: x<-3 plot(1:10) title(bquote(bold(x) <= bold(as.character(.(x)) ))) It prints x<=as.character(3) as title Thanks John - Original Message From: David Winsemius To: array chip Cc: Peter Ehlers ; R Sent: Tue, June 28, 2011 11:30:2

Re: [R] coxph() - unexpected result using Crawley's seedlings data (The R Book)

2011-06-28 Thread Ben Bolker
Jacob Brogren brogren.nu> writes: > > All, > > I rerun once again and managed to reproduce the results from the text book. > Made no changes to the code. Could > it be some problem with convergence? It is possible, but *extremely* unlikely, to get non-deterministic results from R (i.e. runn

Re: [R] cumulative incidence plot vs survival plot

2011-06-28 Thread alanm (Alan Mitchell)
>So in cuminc() function, the argument "fstatus" should be coded like: 0=censored, 1=event of interest, 2=event of competing risk. Then the function will calculate CI for each of the 2 types of events >(event of interest and event of competing risk), am I correct? Correct. >What about running regu

Re: [R] Error in library (nls)

2011-06-28 Thread Ben Bolker
matotope gmail.com> writes: > I installed the 2.8.0 version and it seems to be working fine now. Hard to see from a brief glance at the code why it would not work in 2.13.0 as well, but glad you got the problem solved. If you will need to maintain and extend this code in the future it may be

Re: [R] Axes labels, greek letters and spaces

2011-06-28 Thread David Winsemius
The * operator can be used for a non-space separation. expression(Chlorophyll*italic(a)~mu*g~cm^-2) -- David. On Jun 28, 2011, at 2:21 PM, Sam Albers wrote: Hello all, I can't seem to figure how to use a greek character in expression() in plot() labels without adding a space. So for examp

Re: [R] how to print "<=" in plot title

2011-06-28 Thread David Winsemius
On Jun 28, 2011, at 2:19 PM, array chip wrote: Thank you David and Bert. x<-3plot(1:10) title(bquote( x <= .(x) )) would do what I want. But I also want the title printed in bold font. so I tried x<-3 plot(1:10) title(bquote(bold(x <= .(x)) )) But this did not print the "less than equal

Re: [R] chull increase number of points

2011-06-28 Thread Ben Bolker
nevill.uk.net> writes: > I am using the chull function to create a convex hull of a series of about > 20,000 data points. You already posted this statement (not a question). One more try? (You might as well read the posting guide while you're at it -- please refrain from sending your e-mai

Re: [R] Loop through each subject

2011-06-28 Thread David Winsemius
On Jun 28, 2011, at 1:44 PM, Edward Patzelt wrote: R help - I am attempting to write a script that has multiple subjects in 1 data file. Each subject has multiple rows with columns as variables. Here is my code, I am having problem executing it on each unique subject id (dat $Subject).

[R] Axes labels, greek letters and spaces

2011-06-28 Thread Sam Albers
Hello all, I can't seem to figure how to use a greek character in expression() in plot() labels without adding a space. So for example below when plotting this out x<-1:10 plot(x,x^2, xlab=expression(Chlorophyll~italic(a)~mu~g~cm^-2)) the axis label read as μ g cm^-2 because I have space there

Re: [R] how to print "<=" in plot title

2011-06-28 Thread array chip
Thank you David and Bert. x<-3plot(1:10) title(bquote( x <= .(x) )) would do what I want. But I also want the title printed in bold font. so I tried x<-3 plot(1:10) title(bquote(bold(x <= .(x)) )) But this did not print the "less than equal to" symbol and the number 3 (from variable x) in bol

[R] Loop through each subject

2011-06-28 Thread Edward Patzelt
R help - I am attempting to write a script that has multiple subjects in 1 data file. Each subject has multiple rows with columns as variables. Here is my code, I am having problem executing it on each unique subject id (dat$Subject). getwd() setwd("/Users/edwardpatzelt/Desktop/Neuroimaging

[R] R-Installation on Unix -- "Make: Don't know how to make #. Stop."

2011-06-28 Thread Zhou, Hong
Hi, all, ./configure was run successfully on my HP-UX ia64 server with exit=0, but when type make at prompt, get this error "Make: Don't know how to make #. Stop." Does anyone has any clues about this message? Thank you very much! #make Rmath.h is unchanged `libRblas.sl' is up to date. /app/R/

Re: [R] How do I output all the R-squares of an SUR? summary(fitSUR$eq[[1:4]])$r.squared does not work

2011-06-28 Thread StellathePug
> sapply(fitSUR$eq, function(x) summary(x)$r.squared) > You can abbreviate that to: > sapply(summary(fitSUR)$eq, "[[", "r.squared") This is fantastic! Thanks so much. I had a hunch that it would be something related to the apply family but I am still not very good at using it. Thank you immensel

[R] Function unfold package RcmdrPlugin.survival

2011-06-28 Thread Rapha
Dear all, I am using the function ‘unfold’ from the ‘RcmdrPlugin.survival’ to convert my time-varying covariates dataset from wide to long. I managed to have it working for my data. However, the problem I have is that the observations after an event, won’t be dropped from the dataset. For example

[R] renaming multiple columns + interpolating temperature series

2011-06-28 Thread tomtomme
Greetings R Users, I´m new to R but at least managed to read in multiple files: filenames <- list.files(path=getwd()) numfiles <- length(filenames) for (all_temp in c(1:numfiles)) { filenames[all_temp] <- paste(filenames[all_temp],sep="") assign(gsub("[.]ASC$","temp",filenames[all_temp]),r

Re: [R] Need help on nnet

2011-06-28 Thread arun
Hi Georg, I am new to R and I am curious if there is a simple way to do the feature selection you described: "feature selection is essentially an exhaustive approach which tries every possible subset of your predictors, trains a network and sees what the prediction error is. The subset which is b

Re: [R] Specify ID variable in daisy{cluster}

2011-06-28 Thread adlynch
Hi David - I wanted to thank you for your response! This was exactly what I needed. Sincerely, Alicia On Fri, Jun 17, 2011 at 3:33 PM, David L Carlson [via R] wrote: > You need to use hhid as the rownames for housing.cluster rather than > including it as a variable in the data.frame: > > housing

Re: [R] cumulative incidence plot vs survival plot

2011-06-28 Thread alanm (Alan Mitchell)
John, Since death precludes recurrence, censoring deaths would violate the KM estimator assumption that additional follow-up would eventually lead to an event. If your goal is to estimate the probability of recurrence, then you want CI with deaths as a competing risk. The cuminc function in the

Re: [R] how to print "<=" in plot title

2011-06-28 Thread Bert Gunter
For the record, I was wrong -- using plotmath's "less than or equal" does NOT require platform info. However, I was unsure if you meant that it was some kind of an arrow you wanted to render, a clear misinterpretation on my part. -- Bert On Tue, Jun 28, 2011 at 10:57 AM, array chip wrote: > Than

Re: [R] how to print "<=" in plot title

2011-06-28 Thread David Winsemius
On Jun 28, 2011, at 1:52 PM, Peter Ehlers wrote: On 2011-06-28 10:25, array chip wrote: Hi, how can I print "<=" (I mean the symbol of just one character) in the main title of a plot? for example: plot(1:10, main=paste("x<=", x)) where variable x is some number generated on the fly. x

Re: [R] testInstalledPackages

2011-06-28 Thread Cody Hamilton
Hello Duncan, testci.R is a test function for the survival package.  I compared the .Rout and .Rout.save files by eyeball (I'm on a Windows 7 machine, so I can't use the diff function). The only differences I found were in the file headers. This is the header from the .Rout file: R version 2

Re: [R] how to print "<=" in plot title

2011-06-28 Thread array chip
Thank Peter! How do I make the title in bold font? John - Original Message From: Peter Ehlers To: array chip Cc: R Sent: Tue, June 28, 2011 10:52:07 AM Subject: Re: [R] how to print "<=" in plot title On 2011-06-28 10:25, array chip wrote: > Hi, how can I print "<=" (I mean the sym

Re: [R] how to print "<=" in plot title

2011-06-28 Thread Peter Ehlers
On 2011-06-28 10:25, array chip wrote: Hi, how can I print "<=" (I mean the symbol of just one character) in the main title of a plot? for example: plot(1:10, main=paste("x<=", x)) where variable x is some number generated on the fly. x <- 2.718 plot(0, 0) title(bquote( x %<=% .(x) ))

Re: [R] how to print "<=" in plot title

2011-06-28 Thread array chip
Thanks Bert. here is info: R version 2.12.2 (2011-02-25) Platform: i386-pc-mingw32/i386 (32-bit) locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C LC_TIME=English_United Stat

Re: [R] cumulative incidence plot vs survival plot

2011-06-28 Thread array chip
Alan, Let's say that I code censoring as "0", recurrence as "1" for fstat and death/competing risk as "2". If a patient did not have recurrence and lost follow-up at 2 years in terms of recurrence monitoring, but he also died at 5 years. How should I code this patient? I think I still code this

Re: [R] extracting data

2011-06-28 Thread Peter Ehlers
On 2011-06-28 09:54, Ana Kolar wrote: Hi Sarah, Thank you for your response. Here is a toy example: library(MatchIt) data(lalonde) A<-lalonde f<-treat ~ age + I(age^2) + educ + I(educ^2) + black + hispan + married + nodegree + re74 + I(re74^2) + re75 + I(re75^2) m<-"nearest" m.out.base<-

Re: [R] how to print "<=" in plot title

2011-06-28 Thread Bert Gunter
This is highly system dependent: what "character" do you intend to use for this 2 character representation? Hence, you need to follow the posting guide and give the "at a minimum" system info. ?sessionInfo -- Bert On Tue, Jun 28, 2011 at 10:25 AM, array chip wrote: > Hi, how can I print "<=" (I

[R] how to print "<=" in plot title

2011-06-28 Thread array chip
Hi, how can I print "<=" (I mean the symbol of just one character) in the main title of a plot? for example: plot(1:10, main=paste("x <=", x)) where variable x is some number generated on the fly. Thanks John __ R-help@r-project.org mailing list ht

Re: [R] Saved EPS does not match screen when using bquote(.(i))

2011-06-28 Thread John Kruschke
Many thanks to Uwe Ligges, Peter Ehlers, and Dennis Murphy for suggesting work-arounds for this bug. Because the suggestions are work-arounds, rather than actually correcting the bug, I have opted simply to copy and paste the plotting commands a few times with the subscripts specified as constants

Re: [R] cumulative incidence plot vs survival plot

2011-06-28 Thread array chip
Thank you Alan! Now I sort of understand what it means by competing risk! So in cuminc() function, the argument "fstatus" should be coded like: 0=censored, 1=event of interest, 2=event of competing risk. Then the function will calculate CI for each of the 2 types of events (event of interest an

Re: [R] extracting data

2011-06-28 Thread Ana Kolar
Hi Sarah, Thank you for your response. Here is a toy example: library(MatchIt) data(lalonde) A<-lalonde f<-treat ~ age + I(age^2) + educ + I(educ^2) + black + hispan +     married + nodegree + re74 + I(re74^2) + re75 + I(re75^2) m<-"nearest" m.out.base <- matchit(formula=f, data=A, method=m) B

Re: [R] extracting data

2011-06-28 Thread Sarah Goslee
Hi Ana, On Tue, Jun 28, 2011 at 12:28 PM, Ana Kolar wrote: > Let's say I have an original data set which is called A and data extracted > from this original data set, called B. Based on these A and B data set I > would like to get data set C which includes all the remaining data from the > dat

[R] extracting data

2011-06-28 Thread Ana Kolar
Let's say I have an original data set which is called A and data extracted from this original data set, called B. Based on these A and B data set I would like to get data set C which includes all the remaining data from the data set A after we exclude data of the data set B. Any idea how to do

Re: [R] How do I output all the R-squares of an SUR? summary(fitSUR$eq[[1:4]])$r.squared does not work

2011-06-28 Thread Achim Zeileis
On Tue, 28 Jun 2011, StellathePug wrote: Greetings R Users, I have a system of equations for which I would like to output all the R-squares. Assume there are four equations in my system, the only way I found to output all the R-squares is by calling them out one by one as this: summary(fitSUR$e

[R] How do I output all the R-squares of an SUR? summary(fitSUR$eq[[1:4]])$r.squared does not work

2011-06-28 Thread StellathePug
Greetings R Users, I have a system of equations for which I would like to output all the R-squares. Assume there are four equations in my system, the only way I found to output all the R-squares is by calling them out one by one as this: summary(fitSUR$eq[[1]])$r.squared summary(fitSUR$eq[[2]])$r.

Re: [R] Running R from windows command prompt

2011-06-28 Thread Robert Baer
Subject: Re: [R] Running R from windows command prompt Hi Siddharth, many experts already answered your query, however I would like to share how I run R in command prompt: 1. open command prompt 2. change working directory: cd C:\\R-2.13.0\bin\i386 (put the entire path here, howe

Re: [R] A masked function is a masked function by any other name

2011-06-28 Thread Juan Carlos Borrás
Ops! Thank-you Duncan for clarifying the 2 vs. 3 colon difference and a couple of other things. Working like a charm now. Cheers, jcb! > If you are using ::: (three colons), then you may be looking into the > unexported functions in log4r.  The only normal way to see unexported > functions is to u

Re: [R] Running R from windows command prompt

2011-06-28 Thread Arun Kumar Saha
Hi Siddharth, many experts already answered your query, however I would like to share how I run R in command prompt: 1. open command prompt 2. change working directory: cd C:\\R-2.13.0\bin\i386 (put the entire path here, however many people might find this step weird, you can have

Re: [R] coxph() - unexpected result using Crawley's seedlings data (The R Book)

2011-06-28 Thread Jacob Brogren
All, I rerun once again and managed to reproduce the results from the text book. Made no changes to the code. Could it be some problem with convergence? Anyhow, now it works! Cheers Jacob ps. I find "The R Book" very useful ds. 28 jun 2011 kl. 15.48 skrev Robert A LaBudde: > Did you create

Re: [R] problem with corrgram function

2011-06-28 Thread Eik Vettorazzi
yes it is. and a correlation of 0 isn't exactly white (#FF) either. have a look at the panel.pie function. the crucial part is ncol <- 14 pal <- col.corrgram(ncol) col.ind <- round(ncol * (corr + 1)/2) so an correlation near -1 maps to an index 0, which isn't a proper index in R.

Re: [R] What does class "call" mean? How do I make class "formula" into a "call"?

2011-06-28 Thread Rita Carreira
Thank you Bert and Prof. Ripley for your feedback. I did read the language documentation and it was not entirely clear to me, but I'm one of those people that has to read and digest something before it clicks. However, I did realize that the issue with "call"and "formula" was not the real reas

  1   2   >