Re: [R] Tunnelling X for R graphics

2009-02-02 Thread Prof Brian Ripley
To answer your basic question, you do need to shut down everything involivng X, that is X11() devices and the X11 dataeditor. If you do that (and graphics.off() will suffice for the first), you should be able to re-open an X11 device on another display (which is what presumably a new VNC conne

Re: [R] Package manuals.

2009-02-02 Thread Prof Brian Ripley
If I do this on the top-level directry of a package, I get tystie% R CMD Rd2dvi --pdf RODBC Hmm ... looks like a package ... and it does so by looking for a 'foo/DESCRIPTION' file, and it does give an index. I think you probably do need to update your R, as in < 2.8.1 if there was a problem

[R] Using getSymbols

2009-02-02 Thread Shruthi Jayaram
Hi, How can one ask getSymbols to obtain data within a specified time interval? For example, if I am downloading US PPI data: usppi <- as.zoo(getSymbols("PPIACO", src="FRED", verbose=TRUE, auto.assign=FALSE)) How do I ask getSymbols to truncate starting from Jan-1970 until present? I looked up

[R] Deploying a R model on a cloud computer using PMML

2009-02-02 Thread Ajay ohri
Dear List, Please find an interview from Michael Zeller ,CEO, Zementis. Mike talks about how to use an existing model ( created in R) , using PMML as an intermediate for exporting the model, and deploying it on a cloud computer for as low as 1 $ per hour. Regards, Ajay *Ajay-* *What are the trad

[R] Lattice histogram with vertical lines

2009-02-02 Thread David Scott
I would like to add some vertical lines to a lattice plot of histograms. What I am after is a lattice version of abline(v = 1234). The lattice histogram plot is just: histogram( ~ LTSE | approach, data = arrivals) Can anyone point me in the right direction for this? David Scott ___

[R] reading .odf spreadsheet into R

2009-02-02 Thread stephen sefick
I have searched the archives and I did not find the answer to my question. Is there a way to read in a .odf spreadsheet without modification to a .csv file. I am analyzing my classes scores on their first exam, and would like to read the grade book in without converting it to .csv. thanks -- St

Re: [R] Matrix

2009-02-02 Thread Shruthi Jayaram
Thanks this is very helpful. Shruthi On Tue, Feb 3, 2009 at 1:36 AM, Gabor Grothendieck wrote: > Sorry, there was an error. Try this: > > x <- matrix(1:4, 2) > y <- 10 * x > matrix(t(cbind(x, y)), nc = 2, byrow = TRUE) > > > On Mon, Feb 2, 2009 at 12:32 PM, Gabor Grothendieck > wrote: > > Try t

[R] Package manuals.

2009-02-02 Thread Rolf Turner
When I create a manual for a package that I create and use locally, e.g. via R CMD Rd2dvi --pdf foo where ``foo'' is the name of the directory containing the source for the package (also named ``foo'') the resulting manual does not appear to have an index. The package.pdf files appeari

Re: [R] overlapping bars on "dodge" ggplot histogram - can it be fixed?

2009-02-02 Thread hadley wickham
Hi Jason, I can't see anyway to do this completely within in ggplot. And it's not easy to do the data processing yourself. Here's one attempt that almost works: counts <- ddply(VADeaths_flat_df, .(round_any(Data, 20), Person), nrow) names(counts) <- c("bin", "person", "n") qplot(bin, n, data =

Re: [R] Difference between a[[i]] and a[i]

2009-02-02 Thread Rolf Turner
On 3/02/2009, at 12:45 PM, David Epstein wrote: I'm sure I've read about the difference between a[[i]] and a[i] in R, but I cannot recall what I read. Even more disturbing is the fact that I don't know how to search the newsgroup for this. All the different combinations I tried were dec

[R] overlapping bars on "dodge" ggplot histogram - can it be fixed?

2009-02-02 Thread Jason Rupert
Using the following code to have a little separation between the individual bins: VADeaths_flat_df = stack(as.data.frame(VADeaths)) names(VADeaths_flat_df) = c('Data','Person') ggplot(VADeaths_flat_df, aes(Data, fill = Person)) + geom_bar(position=position_dodge(width =(15)), binwidth=20) The r

[R] pairs() help - colour histograms on diagonal

2009-02-02 Thread Nathan S. Watson-Haigh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'd like to be able to colour histograms along the diagonal using the colours stored in colnames(d): > d blackbluebrowncyan 1 0.96405751 -0.02964390 -0.060147424 -0.06460070 2 -0.03614607 0.95475444 -0.152382053 -0

Re: [R] Boxplots by variable

2009-02-02 Thread Adam D. I. Kramer
Does boxplot(as.data.frame(final)) do what you want? --Adam On Mon, 2 Feb 2009, Vemuri, Aparna wrote: Dear R users, I have a matrix "final" which looks like this: final oSO4 oNO3 mSO4 mNO3 [1,] 3.3728 0.2110 1.9517421 1.01883602 [2,] 0.8249 0.0697 1.5970292 0.113687

Re: [R] Boxplots by variable

2009-02-02 Thread Felipe Carrillo
Hi Vemuri: is this what you want? x <- "oSO4 oNO3 mSO4 mNO3 3.3728 0.2110 1.9517421 1.01883602 0.8249 0.0697 1.5970292 0.11368781 0.2636 0.1004 0.6012445 0.24356332 8.0072 0.3443 6.1016998 3.63207149 13.5079 0.6593 12.4011068 1.55323386 6.1293 0.1989 5.7620926 0.12884845 0.6004

Re: [R] Boxplots by variable

2009-02-02 Thread Mike Lawrence
Check out ggplot2: http://had.co.nz/ggplot2 Particularly: http://had.co.nz/ggplot2/geom_boxplot.html Looks like you'll have to melt your data to long format first though, here's a tutorial: http://www.statmethods.net/management/reshape.html On Mon, Feb 2, 2009 at 8:19 PM, Vemuri, Aparna wrote:

Re: [R] Difference between a[[i]] and a[i]

2009-02-02 Thread Duncan Murdoch
On 02/02/2009 6:45 PM, David Epstein wrote: I'm sure I've read about the difference between a[[i]] and a[i] in R, but I cannot recall what I read. Even more disturbing is the fact that I don't know how to search the newsgroup for this. All the different combinations I tried were declared not to b

[R] Boxplots by variable

2009-02-02 Thread Vemuri, Aparna
Dear R users, I have a matrix "final" which looks like this: final oSO4 oNO3 mSO4 mNO3 [1,] 3.3728 0.2110 1.9517421 1.01883602 [2,] 0.8249 0.0697 1.5970292 0.11368781 [3,] 0.2636 0.1004 0.6012445 0.24356332 [4,] 8.0072 0.3443 6.1016998 3.63207149 [5,] 13.5079 0

Re: [R] executing R batch files

2009-02-02 Thread Gabor Grothendieck
Without the actual VBA commands you are using we can't be sure but if you are using Shell then it requires an exe, not a bat file. Try cmd.exe /c RBatch.bat so that it has an exe file to execute. On Mon, Feb 2, 2009 at 6:42 PM, wrote: > The following command, issued from the DOS command prom

Re: [R] Broke ggplot...

2009-02-02 Thread hadley wickham
On Mon, Feb 2, 2009 at 5:41 PM, Jason Rupert wrote: > It appears I broke ggplot in my script, but that maybe it is because the > caffeine has worn off or maybe it is late in the day. I thought I was > beginning to understand ggplot, but I have encountered a silly little issue. > > For some rea

[R] Difference between a[[i]] and a[i]

2009-02-02 Thread David Epstein
I'm sure I've read about the difference between a[[i]] and a[i] in R, but I cannot recall what I read. Even more disturbing is the fact that I don't know how to search the newsgroup for this. All the different combinations I tried were declared not to be valid search syntax. 1. What sort of objec

[R] executing R batch files

2009-02-02 Thread joseph . g . boyer
The following command, issued from the DOS command prompt (running Windows XP), produces the intended result of a .csv file created by program.R: ?c:\program files\R\R-2.8.0\bin\Rterm.exe? --save < "c:\TEMP\program.R" However, when I create a file called Rbatch.bat that contains exactly the lin

[R] Broke ggplot...

2009-02-02 Thread Jason Rupert
It appears I broke ggplot in my script, but that maybe it is because the caffeine has worn off or maybe it is late in the day.   I thought I was beginning to understand ggplot, but I have encountered a silly little issue.   For some reason the following does not produce a histogram with fill due

Re: [R] New to R

2009-02-02 Thread Gabor Grothendieck
Also you don't need return since it automatically returns the value produced by the last statement that it executes. On Mon, Feb 2, 2009 at 3:44 PM, Greg Snow wrote: > It is not transposing (it just looks that way). The first result is a vector > which is 1 dimensional, but is neither a row or

Re: [R] Upgrading to TINN - R 2.1.1.6

2009-02-02 Thread Felipe Carrillo
Hi Steve: I upgraded to the same Tinn-R version a few days ago and I didn't have any problems at all. Just follow the link below for the instructions. Good luck http://sourceforge.net/forum/forum.php?forum_id=864071 Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior

Re: [R] sem package and AMOS

2009-02-02 Thread John Fox
Dear Anthony, sem() does FIML estimation, not 2SLS, and so it's hard to understand why you're getting "nearly identical" parameter estimates but very different coefficient standard errors and model chi-squares. In fact, unless the problem is very ill-conditioned, the parameter estimates should be

Re: [R] Selectively Removing objects

2009-02-02 Thread Carl Witthoft
Slightly related to this (I think Mr. Rydevik's code solved the question), is a silly thing I wrote up one weekend. It started out as a clone of the unix "rm -i" command, and kept on going out of control :-) I'm not claiming this is clean, or the best way to do this, but it does let you appl

Re: [R] Assigning colnames in loop

2009-02-02 Thread Sundar Dorai-Raj
It's always best to do this with list operations (e.g. lapply) rather than a loop: DF1 <- split(DF, DF$male) DF2 <- lapply(DF1, function(x) { x2 <- t(as.matrix(x[3:5], dimnames = list(levels(x$age), NULL))) as.data.frame(x2) }) Then DF2[["0"]] and DF2[["1"]] are the data.frames you want. HTH

[R] Assigning colnames in loop

2009-02-02 Thread Peter Jepsen
Dear R-listers, I am trying to assign colnames to a data frame within a loop, but I keep getting a "target of assignment expands to non-language object"-error. I need to split up a large dataset into about 20 smaller ones, and I would like to assign colnames within the loop, so I won't have to typ

[R] repeated measures with gls

2009-02-02 Thread Celina Zabaloy
I am using the gls function of the nlme package to analyze data sets of soil respiration which have the following design: 3 complete blocks x 5 sampling dates (time from fertilization) x 3 fertilization levels. The fertilization dates are equal for all subjects (blocks) but not periodical (-46,

Re: [R] Specifying the gap between "dodge'd" bins groups?

2009-02-02 Thread hadley wickham
> However, is there a way to programmatically to extract the bin size that > ggplot selected in order to be able to change this for multiple data sets? Well the default is 30 bins - i.e. range(x) / 30 - in practice you'd want to choose something a bit more informative! > Similarly, is there a way

Re: [R] How do I get my IT department to "bless" R?

2009-02-02 Thread Wacek Kusnierczyk
Rolf Turner wrote: > > On 3/02/2009, at 9:59 AM, Wacek Kusnierczyk wrote: > >> Rolf Turner wrote: >>> >>> On 2/02/2009, at 4:29 PM, Murray Cooper wrote: >>> I was about to post a similar reply. Stavros's reply was very eloquent and should be taken to heart! >>> >>> >>> I would just like t

[R] all data frame columns SUBSET

2009-02-02 Thread Hamid Hamid
Dear All, I have a data frame (mydata), with let say 5 columns V1,V2,...,V5. (we know the power set of {V1,V2,..,V5} has 2^5-1 elements). I need to construct a vector T of length 5 which its i-th element is the maximum of (let say) mean values obtained based on the columns subset of size i. (MY F

[R] Using Information from the Stats4 package in base envir

2009-02-02 Thread lindsey
Hi. Thank you very much in advance for your help. I have generated data from two simple linear models and used k-means clustering (stats4) to identify two clusters in the generated data. Next, I would like to do simple linear regression for each separate cluster. I can do this if I first

Re: [R] How do I get my IT department to "bless" R?

2009-02-02 Thread Rolf Turner
On 3/02/2009, at 9:59 AM, Wacek Kusnierczyk wrote: Rolf Turner wrote: On 2/02/2009, at 4:29 PM, Murray Cooper wrote: I was about to post a similar reply. Stavros's reply was very eloquent and should be taken to heart! I would just like to say that in my very humble opinion Stavros's repl

[R] Upgrading to TINN - R 2.1.1.6

2009-02-02 Thread Steve_Friedman
I know this has been addressed before, but I'm still confused by the solution. When running TINN - R (ver 2.1.1.6) with R (2.8.0) I have lost the functionality of TINN-R It returns an error source(.trPaths[5], echo=TRUE, max.deparse.length=150) I modified the RProfile.site file as follows:

Re: [R] Problems in Recommending R

2009-02-02 Thread Adam D. I. Kramer
On Tue, 3 Feb 2009, Rolf Turner wrote: I think the R website is just fine as it is. Effort should be put into content and not into cosmetics. Those (potential) users who would be likely to be influenced by such trivialities as the appearance of the web page are unlikely to be the sort of peop

Re: [R] How do I get my IT department to "bless" R?

2009-02-02 Thread Wacek Kusnierczyk
Rolf Turner wrote: > > On 2/02/2009, at 4:29 PM, Murray Cooper wrote: > >> I was about to post a similar reply. >> Stavros's reply was very eloquent and should be taken to heart! > > > I would just like to say that in my very humble opinion Stavros's > reply was utter nonsense. It was the sort of

[R] Sweave

2009-02-02 Thread Kjetil Halvorsen
I'm trying to (re)learn Sweave and run into some problems. I use now ubuntu (8.10), emacs + ess. Slowly getting upto speed on ess. I have a complete (hopefully) .Rnw file, but the resulting .tex will not compile. The file does not contain anything exotic, but it produces pdf figures, and that is w

[R] all subset of a data frame column

2009-02-02 Thread Hamid Hamid
Dear All, I have a data frame (mydata), with let say 5 columns V1,V2,...,V5. (we know the power set of {V1,V2,..,V5} has 2^5-1 elements). I need to construct a vector T of length 5 which its i-th element is the maximum of (let say) mean values obtained based on the columns subset of size i. I me

Re: [R] xyplot with lowess curves

2009-02-02 Thread Hutchinson,David [PYR]
Sundar, That is exactly what I was hoping for. Thanks for your help! Dave -Original Message- From: Sundar Dorai-Raj [mailto:sdorai...@gmail.com] Sent: Monday, February 02, 2009 12:47 PM To: Hutchinson,David [PYR] Cc: r-help@r-project.org Subject: Re: [R] xyplot with lowess curves Doe

[R] sem package and AMOS

2009-02-02 Thread Anthony Dick
Hello- I am using R to build my initial models, but need to use AMOS to compare the models of two groups (adults vs. kids). The problem is I am getting different results with R and AMOS for the initial models of the separate groups (and the R results make more sense). The parameter estimates

Re: [R] xyplot with lowess curves

2009-02-02 Thread Sundar Dorai-Raj
Does this do what you want? The "panel" argument has the custom pane function I referred to before. Col <- c("red", "green", "blue", "purple") xyplot ( SnowLineElevation ~ Year | Model, data = d, panel = function(x, y, col, ...) { Col <- Col[panel.number()] panel.xyplot(x, y, col = "blue"

Re: [R] New to R

2009-02-02 Thread Greg Snow
It is not transposing (it just looks that way). The first result is a vector which is 1 dimensional, but is neither a row or a column. The printed version of it looks like a row, because that is a more compact representation. If you sample enough points you will see it wrap around and be repr

Re: [R] R: Trellis Graph

2009-02-02 Thread Deepayan Sarkar
On Mon, Feb 2, 2009 at 11:05 AM, Greg Snow wrote: > ?lattice::shingle > > Hope that helps, if not, give more detail/example. The example in help(banking, package = "lattice") should also be relevant. -Deepayan > > -- > Gregory (Greg) L. Snow Ph.D. > Statistical Data Center > Intermountain Hea

Re: [R] xyplot with lowess curves

2009-02-02 Thread Hutchinson,David [PYR]
I haven't had much luck with a custom panel function; mainly because I don't truly understand how to embedd the functionality into the xyplot command. Here's a reproducible example if you can help out. Thanks, Dave library (lattice) d <- NULL models <- c('A','B','C','D') n = 100 for (i in seq(a

Re: [R] How do I get my IT department to "bless" R?

2009-02-02 Thread Stavros Macrakis
Perhaps rather than globally saying it is "utter nonsense" you would care to refute what you think is wrong about it? -s PS "Tyrants"? Wow, we are really dramatizing life at work now On Mon, Feb 2, 2009 at 3:14 PM, Rolf Turner wrote: > > On 2/02/2009, at 4:29 PM, Murray Coop

Re: [R] Problems in Recommending R

2009-02-02 Thread Rolf Turner
On 2/02/2009, at 3:52 PM, Ajay ohri wrote: Dear List, One persistent feedback I am getting to people who are newly introduced to R ( especially in this cost cutting recession) is - 1) The website looks a bit old. While the current website does have a lot of hard work behind it, should n

Re: [R] How do I get my IT department to "bless" R?

2009-02-02 Thread Rolf Turner
On 2/02/2009, at 4:29 PM, Murray Cooper wrote: I was about to post a similar reply. Stavros's reply was very eloquent and should be taken to heart! I would just like to say that in my very humble opinion Stavros's reply was utter nonsense. It was the sort of excuse-making favoured by tyrant

Re: [R] New to R

2009-02-02 Thread Joe Hughes
All, Thanks for taking the time to reply. I understand a bit more about R and the R way then I did before.The final function looks like this: ## # # Input: # die_size - 4, 6, 8, 10, 20 # number_of_dice - How

Re: [R] Selectively Removing objects

2009-02-02 Thread Paulo Grahl
Thanks Greg. I did in the past looked into the details of how to create a package. I did not seem too complicated, but it would be time consuming -- an then when one thinks in creating a package (even for his own use) it always a good idea to check for wrong inputs, to have all functions well docu

Re: [R] xyplot with lowess curves

2009-02-02 Thread Sundar Dorai-Raj
You'll need a custom panel function. It would also help if you provided a reproducible example: xyplot ( SnowLineElevation ~ Year | Model, data = data, panel = function(x, y, col, ...) { col <- ifelse(panel.number() == 1, "red", "green") panel.xyplot(x, y, col = "blue", ...) pane

Re: [R] sas.get under Linux

2009-02-02 Thread Frank E Harrell Jr
Adrian Dusa wrote: Dear Frank, I understand. Never used SAS before, so I don't have it installed anywhere. StatTransfer is a very useful tool indeed, but maybe I don't know how to use it properly. What I have is a "mydata.sas7bdat" file, along with a "formats.sas7bcat" file. I specified

Re: [R] survfit using quantiles to group age

2009-02-02 Thread Frank E Harrell Jr
Eleni Rapsomaniki wrote: I am using the package Design for survival analysis. I want to plot a simple Kaplan-Meier fit of survival vs. age, with age grouped as quantiles. I can do this: survplot(survfit(Surv(time,status) ~ cut(age,3), data=veteran) but I would like to do something like this:

Re: [R] Problems in Recommending R

2009-02-02 Thread Tobias Verbeke
friedrich.lei...@stat.uni-muenchen.de wrote: On Mon, 2 Feb 2009 18:14:03 +0530, Ajay ohri (Ao) wrote: > Plain HTML coding is simple enough for this list ( I think)...but aesthetic > designhmm In most cases one can do more than most think using HTML and CSS: Our universities corporate

Re: [R] How do I get my IT department to "bless" R?

2009-02-02 Thread nashjc
I won't burden the list with copies of earlier posts -- all of us have experienced the frustration of dealing with folk who want to make their life easier by making ours difficult. However, I have noted that a few folk are starting to change attitudes. I was hired to give a training session last Ju

Re: [R] Tunnelling X for R graphics

2009-02-02 Thread Adam D. I. Kramer
On Tue, 3 Feb 2009, Patrick Connolly wrote: The problem, and maybe I'm just whining here, is that because the data sets are large this takes several minutes where I'm basically just sitting around. This happens once every other day as the VPN software I'm using "times out" after about

Re: [R] Power analysis for MANOVA?

2009-02-02 Thread Adam D. I. Kramer
Hi Rick, I understand the authors' point and also agree that post-hoc power analysis is basically not telling me anything more than the p-value and initial statistic for the test I am interested in computing power for. Beta is a simple function of alpha, p, and the statistic.

Re: [R] Tunnelling X for R graphics

2009-02-02 Thread Adam D. I. Kramer
Indeed, I am running R in screen. That is the context in which this error occurs. The problem is that screen passes $DISPLAY as the $DISPLAY for the actual terminal. So when the ssh session dies, the X11 connection is broken. The REST of R works fine...which is why I use screen in the first plac

Re: [R] New to R

2009-02-02 Thread Wacek Kusnierczyk
Joe Hughes wrote: > > # > function(die_size, number_of_dice, number_of_rolls) > { you may want to replace > rolls <- array(0, dim=c(number_of_rolls, number_of_dice)) > > for (i in 1:number_of_rolls) > { > rolls[i,] <- sample(die_size, number_of_dice, replace=TRUE) > }

Re: [R] R: Trellis Graph

2009-02-02 Thread Greg Snow
?lattice::shingle Hope that helps, if not, give more detail/example. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On B

Re: [R] New to R

2009-02-02 Thread Greg Snow
If you are interested in rolling dice with R (as opposed to using this as a simple test case to start writing your own programs), then you may want to look at the "dice" function from the TeachingDemos package. The core line in this function is basically the same as Gabor's suggestion, but with

[R] xyplot with lowess curves

2009-02-02 Thread Hutchinson,David [PYR]
I am trying to change the attributes of the lowess lines fit to an xyplot command, but have been unsuccessful in my search of the online help. Right now, both the points and lowess line come out in the same color (blue). I am unsure how I can change the properties of the lowess line separately. x

Re: [R] Tunnelling X for R graphics

2009-02-02 Thread Patrick Connolly
On Sat, 31-Jan-2009 at 03:16PM -0800, Adam D. I. Kramer wrote: [] > The problem, and maybe I'm just whining here, is that because the > data sets are large this takes several minutes where I'm basically just > sitting around. This happens once every other day as the VPN software I'm >

[R] [R-pkgs] RMySQL 0.7-3

2009-02-02 Thread Jeffrey Horner
Dear R users, RMySQL 0.7-3 has been released. Expect it to hit the CRAN mirrors shortly, but in the mean time please get it here: http://biostat.mc.vanderbilt.edu/RMySQL From the NEWS file: Version 0.7-3 * Added mysqlClientLibraryVersions() which returns the compiled and loaded client lib

[R] Now - how to fix the overlap

2009-02-02 Thread Jason Rupert
Yikes.    On closer inspection this causes there to be a noticeable amount of overlap of the various vertical bars.  Speccifically, it appears that the second overlaps the first, the third overlaps the second, etc.   This is much more noteable for a data set with a smaller x-axis.    Thanks aga

Re: [R] Selectively Removing objects

2009-02-02 Thread Greg Snow
If you want to keep the functions, why not move them to a different environment so that they don't get deleted when you delete everything else (this will also work better if you want to use these same functions in other R sessions). The most comprehensive way to do this is to create a package wi

Re: [R] New to R

2009-02-02 Thread Gabor Grothendieck
Yes, it should be TRUE. On Mon, Feb 2, 2009 at 1:16 PM, Joe Hughes wrote: > Gabor, > >Shouldn't the replace be TRUE instead of FALSE? I get this error > > Error in sample(6, 28, replace = FALSE) : > cannot take a sample larger than the population when 'replace = FALSE' > > when I use FA

Re: [R] How do I get my IT department to "bless" R?

2009-02-02 Thread Greg Snow
There has already been good discussion on this topic, but here are a couple of other things to think about: 1. is it your job to convince your IT department, or is it your job to convince your boss, and your boss's job to convince/dictate to the IT department (getting your boss on your side cou

Re: [R] New to R

2009-02-02 Thread Joe Hughes
Gabor, Shouldn't the replace be TRUE instead of FALSE? I get this error Error in sample(6, 28, replace = FALSE) : cannot take a sample larger than the population when 'replace = FALSE' when I use FALSE. I don't get the error when it is TRUE. Examining my mental model of what i

[R] survfit using quantiles to group age

2009-02-02 Thread Eleni Rapsomaniki
I am using the package Design for survival analysis. I want to plot a simple Kaplan-Meier fit of survival vs. age, with age grouped as quantiles. I can do this: survplot(survfit(Surv(time,status) ~ cut(age,3), data=veteran) but I would like to do something like this: survplot(survfit(Surv(t

Re: [R] New to R

2009-02-02 Thread Gabor Grothendieck
Try this: matrix(sample(dsize, nrolls * ndice, replace = FALSE), nrolls, ndice) On Mon, Feb 2, 2009 at 12:39 PM, Joe Hughes wrote: > Hello All, > >A colleague of mine started working with R and out of curiosity I did > some research on the language. Very nice. In my opinion this is one

[R] quantiles for sorted pairs of data

2009-02-02 Thread Monica Pisica
Hi everybody, Suppose I have continuous measurements of an energy waveform that is sampled discretely for different heights every 0.5m. Let's say I want to find out the height for which I have equal amount of energy above and below. My colleague did the following: a. calculate the cumulative

Re: [R] Tunnelling X for R graphics

2009-02-02 Thread Dylan Beaudette
On Saturday 31 January 2009, Erik Iverson wrote: > Dylan, > > Can you confirm that you've done that before while tunneling R graphics > over ssh? I thought I'd tried and screen and failed with a similar message > when using graphics as Adam had. I could be wrong though. Ack. Maybe I spoke too so

Re: [R] Specifying the gap between "dodge'd" bins groups?

2009-02-02 Thread Jason Rupert
This appears to work great.   However, is there a way to programmatically to extract the bin size that ggplot selected in order to be able to change this for multiple data sets?   Similarly, is there a way to determine the number of count in each bin that ggplot establish?  I wanted to change t

[R] New to R

2009-02-02 Thread Joe Hughes
Hello All, A colleague of mine started working with R and out of curiosity I did some research on the language. Very nice. In my opinion this is one of the best languages I've found for getting tasks I'm interested in done. I wrote this simple die roller and was curious to know if it is

Re: [R] Matrix

2009-02-02 Thread Gabor Grothendieck
Sorry, there was an error. Try this: x <- matrix(1:4, 2) y <- 10 * x matrix(t(cbind(x, y)), nc = 2, byrow = TRUE) On Mon, Feb 2, 2009 at 12:32 PM, Gabor Grothendieck wrote: > Try this: > > matrix(rbind(x, y), nc = 2, byrow = TRUE) > > > On Mon, Feb 2, 2009 at 10:52 AM, Shruthi Jayaram > wrote:

Re: [R] Matrix

2009-02-02 Thread Gabor Grothendieck
Try this: matrix(rbind(x, y), nc = 2, byrow = TRUE) On Mon, Feb 2, 2009 at 10:52 AM, Shruthi Jayaram wrote: > > Hi, > > I have a very basic question on merging two matrices by alternating the > rows. For illustration, assume two matrices - > > A looks like: > > 10 10 > 10 10 > > B looks like: >

Re: [R] bootstrapping in regression

2009-02-02 Thread Greg Snow
Others have confirmed that you use the predicted values plus permuted residuals is the new y variable and also referred you to some other articles. On the question of does this work for mixed effects models: That is a good question, and it depends on what question you are trying to answer and w

Re: [R] Odp: Matrix

2009-02-02 Thread baptiste auguie
Hi, Perhaps this can help if you don't want to manually specify the permutation of indices, A=matrix(10,ncol=2,nrow=2) B <- 2*A C <- rbind(A, B) C[ as.vector(t(matrix(seq(1,nrow(C)),ncol=2))), ] # trick to create the vector of permutations [,1] [,2] [1,] 10 10 [2,] 20 20 [

Re: [R] Specifying the gap between "dodge'd" bins groups?

2009-02-02 Thread hadley wickham
Hi Jason, On Mon, Feb 2, 2009 at 9:10 AM, Jason Rupert wrote: > I'm looking at ggplot-static\position_dodge.html > > For ggplot(diamonds, aes(x=price, fill=cut)) + geom_bar(position="dodge") , > is it possible to specify the spacing between the dodge'd bin groupings? > > That is, I would like fo

Re: [R] Odp: Matrix

2009-02-02 Thread Paul Smith
On Mon, Feb 2, 2009 at 4:05 PM, Petr PIKAL wrote: > Hi > > r-help-boun...@r-project.org napsal dne 02.02.2009 16:52:06: > >> >> Hi, >> >> I have a very basic question on merging two matrices by alternating the >> rows. For illustration, assume two matrices - >> >> A looks like: >> >> 10 10 >> 10 1

Re: [R] how to generate multiple random variables that are correlated

2009-02-02 Thread Ben Bolker
eric lee gmail.com> writes: [snip] > > Is there an R function that generates random values for my two > variables given the correlation? I'd like to do this for up to 5 > variables and I'm running version 2.7.2 on a windows platform. > Thanks. ?MASS::mvrnrom ___

[R] Specifying the gap between "dodge'd" bins groups?

2009-02-02 Thread Jason Rupert
I'm looking at ggplot-static\position_dodge.html   For ggplot(diamonds, aes(x=price, fill=cut)) + geom_bar(position="dodge") , is it possible to specify the spacing between the dodge'd bin groupings?    That is, I would like for there to be a small separation (horizontal space) between the "Idea

[R] Error message when executing summary() with dataset diamonds in ggplot2

2009-02-02 Thread Jim Watkins
Hi: I am experiencing a problem with dataset diamonds in ggplot2. When trying execute the summary(diamonds) statement, the following error message is displayed: Error in summary(diamonds) : Cannot open file 'C:/Users/James/R_Pgms/R/R-2.8.1/library/ggplot2/data/Rdata.rdb': No such file or dire

Re: [R] how to generate multiple random variables that are correlated

2009-02-02 Thread Jorge Ivan Velez
Dear Eric, See ?mvrnorm in the MASS package. HTH, Jorge On Mon, Feb 2, 2009 at 11:15 AM, eric lee wrote: > Hi. > > I have two variables, x and y, that are each normally distributed with > mean 0 and have known standard deviations. The variables also have a > known correlation, so I can rep

[R] how to generate multiple random variables that are correlated

2009-02-02 Thread eric lee
Hi. I have two variables, x and y, that are each normally distributed with mean 0 and have known standard deviations. The variables also have a known correlation, so I can represent their correlations in a matrix like so: a <- array(c(0.3,0.1,0.1,0.2),c(2,2)) a Is there an R function that gener

[R] Odp: Matrix

2009-02-02 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 02.02.2009 16:52:06: > > Hi, > > I have a very basic question on merging two matrices by alternating the > rows. For illustration, assume two matrices - > > A looks like: > > 10 10 > 10 10 > > B looks like: > > 20 20 > 20 20 > > How do I combine

Re: [R] Defining plot colors based on a variable

2009-02-02 Thread Andrew Singleton
Hadley and Thierry, thank you ­ ggplot2 is a great package and this worked perfectly. On 2/2/09 10:10 AM, "hadley wickham" wrote: > On Mon, Feb 2, 2009 at 8:56 AM, Andrew Singleton > wrote: >> > Hi, I have been trying unsuccessfully to plot data using different colors >> > based on a variable

Re: [R] Problem with foreign package

2009-02-02 Thread Kevin E. Thorpe
Prof Brian Ripley wrote: On Mon, 2 Feb 2009, Duncan Murdoch wrote: On 2/2/2009 8:46 AM, Kevin E. Thorpe wrote: I tried to use write.foreign() to export to SAS this morning and got an error. When I looked at the code for writeForeignSAS() I saw this line: dfn < -df which I think should be

[R] Matrix

2009-02-02 Thread Shruthi Jayaram
Hi, I have a very basic question on merging two matrices by alternating the rows. For illustration, assume two matrices - A looks like: 10 10 10 10 B looks like: 20 20 20 20 How do I combine them such that I get alternating rows from A and B? My final result should be C which looks like: 1

Re: [R] Problem with foreign package

2009-02-02 Thread Prof Brian Ripley
On Mon, 2 Feb 2009, Duncan Murdoch wrote: On 2/2/2009 8:46 AM, Kevin E. Thorpe wrote: I tried to use write.foreign() to export to SAS this morning and got an error. When I looked at the code for writeForeignSAS() I saw this line: dfn < -df which I think should be dfn <- df So, I tried to

Re: [R] error message with roxygen

2009-02-02 Thread David Hajage
Thank you Hadley! 2009/2/2 hadley wickham > On Fri, Jan 30, 2009 at 3:49 AM, David Hajage wrote: > > Hello useRs, > > > > I'm trying to use the Roxygen package. > > > > Here my code file : > > #' A packge to check Roxygen's sanity > > #' @name helloRoxygen-package > > #' @docType package > > NA

Re: [R] error message with roxygen

2009-02-02 Thread hadley wickham
On Fri, Jan 30, 2009 at 3:49 AM, David Hajage wrote: > Hello useRs, > > I'm trying to use the Roxygen package. > > Here my code file : > #' A packge to check Roxygen's sanity > #' @name helloRoxygen-package > #' @docType package > NA > > And my R code to generate the package : > library(roxygen) >

Re: [R] Problems in Recommending R

2009-02-02 Thread hadley wickham
> We often get emails like the first in this thread that R could do with > an update on homepage design (I fully agree) ... but actually nobody > volunteers to do it. Hence, we still have what I did when the > worldwide number of R users was probably less than 1000. Well I've volunteered a couple

[R] Outliers package function scores question

2009-02-02 Thread diego Diego
Dear R-experts, I'm having some doubts concernig the scores function of the "outliers" package. I don´t understand the results when I select the p-value option on a sample, ie, when I use scores(x,"(method)",1). The help on the function says that the output are the p-values associatted to the samp

Re: [R] Defining plot colors based on a variable

2009-02-02 Thread hadley wickham
On Mon, Feb 2, 2009 at 8:56 AM, Andrew Singleton wrote: > Hi, I have been trying unsuccessfully to plot data using different colors > based on a variable within a subset of an imported file. The file I am > reading is about 2 lines long and has a column (in the example called > FILE) that cont

Re: [R] Defining plot colors based on a variable

2009-02-02 Thread ONKELINX, Thierry
Dear Andrew, Have a look at ggplot2 library(ggplot2) ggplot(curr_assoc, aes(x = BP, y = P, colour = FILE)) + geom_point() + scale_y_log10() HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek /

Re: [R] concatenating 2 text columns in a data.frame

2009-02-02 Thread Philipp Pagel
On Mon, Feb 02, 2009 at 09:44:28AM -0500, Shaun Grannis wrote: > I'm trying to concatenate values from two columns in a data frame. For > example, I have the following data.frame: > > C1 C2 C3 C4 C5 > A B *F C* Q > G H *I J* T > K D *R S* E > P L *M N* O > > I'

[R] Defining plot colors based on a variable

2009-02-02 Thread Andrew Singleton
Hi, I have been trying unsuccessfully to plot data using different colors based on a variable within a subset of an imported file. The file I am reading is about 2 lines long and has a column (in the example called FILE) that contains approximately 100 unique entries. I would like to plot a sub

Re: [R] Problems in Recommending R

2009-02-02 Thread stephen sefick
I offer my time in this particular pursuit. Although, the website is functional and I wonder if statisticians and other scientists care about the aesthetics of the website. R is incredibly useful to me, and until this conversation I didn't even realize that the website was a little old school, bu

  1   2   >