Re: [R] Select a set of rows based on a condition

2011-12-07 Thread RaoulD
Thanks a million Michael! Works perfectly! Really appreciate it! -- View this message in context: http://r.789695.n4.nabble.com/Select-a-set-of-rows-based-on-a-condition-tp4168594p4171746.html Sent from the R help mailing list archive at Nabble.com. __

[R] Fit initial time with modFit and modCost

2011-12-07 Thread Bernhard Konrad
Hello, I would like to use modFit and modCost from the package FME to find the optimal initial time t0 of a process. For simplicity, the process is either "off" (value 0) or "on" (value h). So I have a data vector with some zeros followed by some h's, e.g. > c(0,0,0,2,2,2,2,2,2,2) [1] 0 0 0 2 2

Re: [R] read.table performance

2011-12-07 Thread Gene Leynes
No, it was just on my desktop (and on a network drive, and in a temp folder on my c drive). There have been some new policies put into place at work though, and perhaps that includes more / some monitoring software, but I don't know. Sent from my iPhone On Dec 7, 2011, at 4:11 PM, peter dalgaard

[R] partial duplicates of dataframe rows, indexing and removal

2011-12-07 Thread Dgnn
Hello. I am trying to remove from my dataframe, those rows in which the first 7 columns are duplicated even if subsequent columns make those rows unique. df<-data.frame(id=rep(c('amy','bob','joe') , each=5), pet1=sample(LETTERS[1:3],15, replace=T), pet2=sample(LETTERS[1:3],15, replace=T),

[R] SVM performance using laplace kernel is too slow

2011-12-07 Thread Rich Stokes
I've created an SVM in R using the kernlab package, however it's running incredibly slow (20,000 predictions takes ~45 seconds on win64 R distribution). CPU is running at 25% and RAM utilization is a mere 17% ... it's not a hardware bottleneck. Similar calculations using data mining algorithms i

[R] Label margins in multiple perspective plots per page

2011-12-07 Thread K. VanKirk
Hi folks~ As yet I've been unable to determine how to expand the distance between the tick marks and tick labels in perspective plots. None of the 'par' setting appear to be applicable to this (including mfg), and placing multiple plots per page results in a bit obscurity, with the tick values ove

Re: [R] nice report generator?

2011-12-07 Thread R. Michael Weylandt
And for tableGrob, you can see some very basic functionality by typing library(gridExtra) example(tableGrob) Michael On Wed, Dec 7, 2011 at 11:58 PM, Gabor Grothendieck wrote: > On Wed, Dec 7, 2011 at 11:42 PM, Michael wrote: >> Do you have an example...? Thanks a lot! > > See this video: > ht

Re: [R] nice report generator?

2011-12-07 Thread Gabor Grothendieck
On Wed, Dec 7, 2011 at 11:42 PM, Michael wrote: > Do you have an example...? Thanks a lot! See this video: http://www.woopid.com/video/1388/Format-as-Table -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com

Re: [R] nice report generator?

2011-12-07 Thread Michael
Do you have an example...? Thanks a lot! On Wed, Dec 7, 2011 at 9:55 PM, Rainer Schuermann wrote: > > ... or perhaps some other CRAN package has already gone in > > this direction. > > The tableGrob function in the gridExtra package probably is one of them. > > > Original-Nachricht

Re: [R] map at fips level using multiple variables

2011-12-07 Thread bby2103
Hi David, Sorry it sounds vague. Here is my current code, which gives the distribution of family size at US county level. You will see on a US map family size distribution represented by different colors. Now if i have another variable income, which has 3 categories(<50k, 50k-80k,>80k).

Re: [R] plotting and coloring longitudinal data with three time points (ggplot2)

2011-12-07 Thread Eric Fail
Thank you for solving my problem, it worked out beautifully. This was exactly what I was looking for, the ggplot2 package keeps impressing me. Thanks, Eric On Wed, Dec 7, 2011 at 6:01 AM, Hadley Wickham wrote: > On Wed, Dec 7, 2011 at 4:02 AM, Eric Fail wrote: >>  Dear list, >> >> I have been

Re: [R] nice report generator?

2011-12-07 Thread Rainer Schuermann
> ... or perhaps some other CRAN package has already gone in > this direction. The tableGrob function in the gridExtra package probably is one of them. Original-Nachricht > Datum: Wed, 7 Dec 2011 19:29:54 -0500 > Von: Gabor Grothendieck > An: Duncan Murdoch > CC: r-help , Jan

Re: [R] a weird "cut" question

2011-12-07 Thread William Dunlap
You could use quantile() to create the breakpoints > x <- c(47677, 47602, 47678, 47905, 47909, 47906, 47605, 47673, 47607) > cutX <- cut(x, breaks=quantile(x, (0:3)/3), include.lowest=TRUE) > cutX [1] (4.77e+04,4.78e+04] [4.76e+04,4.77e+04] (4.77e+04,4.78e+04] (4.78e+04,4.79e+04] [5] (4.

[R] a weird "cut" question

2011-12-07 Thread Erin Hodgess
Dear R People: I have the following data: > ail.df[,1] [1] 47677 47602 47678 47905 47909 47906 47605 47673 47607 > cut(ail.df[,1],breaks=3) [1] (4.76e+04,4.77e+04] (4.76e+04,4.77e+04] (4.76e+04,4.77e+04] [4] (4.78e+04,4.79e+04] (4.78e+04,4.79e+04] (4.78e+04,4.79e+04] [7] (4.76e+04,4.77e+04] (4.76

Re: [R] MIXED MODEL WITH REPEATED MEASURES

2011-12-07 Thread Douglas Bates
On Dec 7, 2011 4:44 PM, "Erin Ryan" wrote: > > I am trying to specify a mixed model for my research, but I can't quite get > it to work. I've spent several weeks looking thru various online sources to > no avail. I can't find an example of someone trying to do precisely what I'm > trying to do. I'

Re: [R] Help! I couldn't put multiple qplot on the same page...

2011-12-07 Thread Yihui Xie
The two plots are in two PDF files, and I said I cheated via LaTeX, i.e. nothing but putting two \includegraphics{} commands in the same paragraph. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA

Re: [R] R on the cloud - Windows to Linux

2011-12-07 Thread Whit Armstrong
subscribe to R-hpc. and check out these: https://github.com/armstrtw/rzmq https://github.com/armstrtw/AWS.tools https://github.com/armstrtw/deathstar and this: http://code.google.com/p/segue/ If you're willing to work, you can probably get deathstar to work using a local windows box and remote l

Re: [R] R function implementation

2011-12-07 Thread jim holtman
Before rewriting in C, especially if you are new at it, have you profiled (Rprof) your function to see the time is being spent? Are you using dataframe or matrices; there is a big speed different between them when accessing data. So profile your code, see where the time is spent and then decide w

Re: [R] map at fips level using multiple variables

2011-12-07 Thread David Winsemius
On Dec 7, 2011, at 6:12 PM, bby2...@columbia.edu wrote: Hi, I just started playing with county FIPS feature in maps package which allows geospatial visualization of variables on US county level. Pretty cool. Got code? I did some search but couldn't find answer to this question--how can

[R] Adding a modified top axis label using LatticeExtra and theEconomist theme

2011-12-07 Thread Saptarshi Guha
Hello, I have the following code asTheEconomist(bwplot(ver~quans,data=z,cex=0.5,subset=abs(quans)<1.1,scales=list(x=list(tick.num=20,cex=0.55,alternating=3)) ,xscale.components = xscale.components.CF ,main=list('FOOO"',cex=0.8))) The xscale.components displays the exponent of the

Re: [R] nice report generator?

2011-12-07 Thread Gabor Grothendieck
On Wed, Dec 7, 2011 at 5:58 PM, Duncan Murdoch wrote: > On 11-12-07 5:43 PM, Gabor Grothendieck wrote: >> >> On Wed, Dec 7, 2011 at 5:26 PM, Richard M. Heiberger >>  wrote: >>> >>> Michael, >>> >>> that is a challenge. >>> >>> I accept it and suggest that it be a contest on the R-help list. >>> >>

Re: [R] Help! I couldn't put multiple qplot on the same page...

2011-12-07 Thread William Dunlap
I've lost track of the changes you've done to your code and your original code was not runnable. However, I noticed it used the line myplotlist[nCount]=tt where myplotlist was a list. Try changing that to myplotlist[[nCount]] <- tt (the '=' is acceptable but the the '[' is wrong). I made tha

[R] R function implementation

2011-12-07 Thread Diviya Smith
Hello there, I recently wrote some code to perform pairwise correlations between all samples in a large dataset. So we are talking about performing pairwise correlations between 400K vectors. Since R has a very rich library of functions, it was very easy to code this in R. However, R was probably

Re: [R] Help! I couldn't put multiple qplot on the same page...

2011-12-07 Thread Michael
Still the same problem - in the final aggregated plots, all the titles are diffrent(which is good), but the curve shapes are the same... How could this happen? Is this a bug? On 12/7/11, Tengfei Yin wrote: > library(gridExtra) > ?grid.arrange > > I found this function convenient to me, it could

Re: [R] Help! I couldn't put multiple qplot on the same page...

2011-12-07 Thread Michael
Very surprisingly in the generated multi-plot-on-the-same-page, the titles of the sub-plots are different... but their contents are the same(ie. the plotted curves are the same)... How could this happen? Any thoughts? On 12/7/11, Yihui Xie wrote: > This is another frequently asked question abou

Re: [R] Help! I couldn't put multiple qplot on the same page...

2011-12-07 Thread Tengfei Yin
library(gridExtra) ?grid.arrange I found this function convenient to me, it could arrange multiple ggplot object on the same view window p1 <- qplot(...) p2 <- qplot(...) grid.arrange(p1, p2, ..., nrow = 2) different from your design, but for the same purpose I guess. cheers Tengfei On We

Re: [R] Help! I couldn't put multiple qplot on the same page...

2011-12-07 Thread Michael
I also did (inside the for loop): if (nCount==1) p1=tt if (nCount==2) p2=tt if (nCount==3) p3=tt if (nCount==4) p4=tt if (nCount==5) p5=tt if (nCount==6) p6=tt ... and then after the loop: windows() my.multiplot(p1, p2, p3, p4, p5, p6, cols=3) A

Re: [R] Help! I couldn't put multiple qplot on the same page...

2011-12-07 Thread Yihui Xie
This is another frequently asked question about ggplot2, but I don't know. What I can tell you is, if you use Sweave, you probably can consider the knitr package, which enables you to put any plots on one "page" (yes, I'm cheating via LaTeX); see Figure 1 in the manual: https://github.com/downloads

[R] map at fips level using multiple variables

2011-12-07 Thread bby2103
Hi, I just started playing with county FIPS feature in maps package which allows geospatial visualization of variables on US county level. Pretty cool. I did some search but couldn't find answer to this question--how can I map more than 2 variables on US map? For example, you can map by the

Re: [R] Help! I couldn't put multiple qplot on the same page...

2011-12-07 Thread Michael
Thanks a lot! Now I can see the individual plot, but still not the originally-desired multi-plot-on-one-page? Any thoughts? Thanks again! On 12/7/11, Yihui Xie wrote: > This is probably one of the most frequently asked questions. The > answer is to print() the objects. See R FAQ 7.22. > > http:

Re: [R] help wrapping findInterval into a function

2011-12-07 Thread R. Michael Weylandt
So I don't know what you are trying to do with your function (and I might have incidentally messed it up), but within certainly does add the desired column: WaterData <- structure(list(Site = structure(c(3L, 3L, 3L, 3L, 3L, 3L), .Label = c("BV", "CB", "KP", "LA", "MR", "PIE"), class = "factor"), T

[R] R on the cloud - Windows to Linux

2011-12-07 Thread Ben quant
Hello, I'm working with the gam function and due to the amount of data I am working with it is taking a long time to run. I looked at the tips to get it to run faster, but none have acceptable side effects. That is the real problem. I have accepted that gam will run a long time. I will be running

Re: [R] nice report generator?

2011-12-07 Thread Duncan Murdoch
On 11-12-07 5:43 PM, Gabor Grothendieck wrote: On Wed, Dec 7, 2011 at 5:26 PM, Richard M. Heiberger wrote: Michael, that is a challenge. I accept it and suggest that it be a contest on the R-help list. Please post a pdf file showing some (more than one) tables that you think look better in E

Re: [R] data frame and cumulative sum

2011-12-07 Thread Giovanni Azua
Thank you Michael, indeed, my bad, I get so deep in trying to solve the problem that forget to try the most basic help first. Best regards, Giovanni On Dec 7, 2011, at 11:20 PM, R. Michael Weylandt wrote: > ??"cumulative sum" would almost certainly lead you to cumsum with only > a modicum of

Re: [R] nice report generator?

2011-12-07 Thread Gabor Grothendieck
On Wed, Dec 7, 2011 at 5:26 PM, Richard M. Heiberger wrote: > Michael, > > that is a challenge. > > I accept it and suggest that it be a contest on the R-help list. > > Please post a pdf file showing some (more than one) tables that you think > look better in Excel than in LaTeX. > I,and probably

Re: [R] Plotting Time Series Data by Month

2011-12-07 Thread R. Michael Weylandt
Glad to help! There are definitely enough colors, but they aren't all assigned numbers automatically: to see a list of built in ones, try colors() You can always use a character string to specify a color as well -- but I think the easiest thing to do might be to use one of the palette functions l

[R] Correlation of events over time

2011-12-07 Thread Marie Duarte
Would anyone be able to help me out with the following (or at the least a reference covering the technique (using R) that I require)?; I have a list of events (A, B, C, D), their start date/time and their duration. I also have a time series of a level which is generally maintained at around 90% h

Re: [R] Hist and extra space

2011-12-07 Thread Filoche
Thank you sire. It worked fine. I was using the parameter in the hist(...) function. I now use it with par and it works perfectly. Regards, Phil -- View this message in context: http://r.789695.n4.nabble.com/Hist-and-extra-space-tp4169121p4170452.html Sent from the R help mailing list archive a

Re: [R] Help! I couldn't put multiple qplot on the same page...

2011-12-07 Thread Yihui Xie
This is probably one of the most frequently asked questions. The answer is to print() the objects. See R FAQ 7.22. http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-do-lattice_002ftrellis-graphics-not-work_003f Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of S

Re: [R] help wrapping findInterval into a function

2011-12-07 Thread Steve E.
forgot to attach the data set http://r.789695.n4.nabble.com/file/n4170695/WaterData.txt WaterData.txt -- View this message in context: http://r.789695.n4.nabble.com/help-wrapping-findInterval-into-a-function-tp4165464p4170695.html Sent from the R help mailing list archive at Nabble.com. ___

[R] Dividing rows when time is overlapping

2011-12-07 Thread PEL
Hi all, I have dataframe that was created from the fusion of two dataframes. Both spanned over the same time intervall but contained different information. When I put them together, the info overlapped since there is no holes in the time interval of one of the dataframe. Here is an example where t

Re: [R] How to scale arrows to approximately fill a plot region?

2011-12-07 Thread Mark Difford
On Dec 07, 2011 at 10:20pm Michael Friendly asked: > How to scale arrows to approximately fill a plot region? Michael, Following Uwe...If you want code that does it then look at what Daniel Chessel did in package ade4: ## > scatter.dudi function (x, xax = 1, yax = 2, clab.row = 0.75, clab.col =

Re: [R] help wrapping findInterval into a function

2011-12-07 Thread Steve E.
Thanks to everyone for continued assistance with this problem. I realize that I had not included enough information, hopefully I have done so here. I attached a dput output of a sample of the data titled 'WaterData' (and str output below). Below are dput outputs of the function I am trying to ge

Re: [R] RSPython installation

2011-12-07 Thread Gene Leynes
Some updates: I noticed that INSTALL.win actually contains some instructions for installing on Windows (initially I thought it was a configuration file) Following those directions (and with some help) 1. Unzipped the package into the R library 2. Added a file called local.config with my in

[R] MIXED MODEL WITH REPEATED MEASURES

2011-12-07 Thread Erin Ryan
I am trying to specify a mixed model for my research, but I can't quite get it to work. I've spent several weeks looking thru various online sources to no avail. I can't find an example of someone trying to do precisely what I'm trying to do. I'm hoping some smart member of this mailing list may be

Re: [R] Plotting Time Series Data by Month

2011-12-07 Thread crazedruff
Sorry about that, new to posting here! Your code was extremely helpful, and tweaking it a bit gave me the output I was looking for: plot( rep(1:12, 17), pox, col = rep(1:17, each = 12), xaxt = "n", ylab="Reported Cases",xlab = "Months", pch = 20, main="Monthly Trends of Chickenpox") axis(1, at = 1

Re: [R] Object xxx not found

2011-12-07 Thread John Visagie
Thank you, Michael. This message and attachments are subject to a disclaimer. Please refer to www.it.up.ac.za/documentation/governance/disclaimer/ for full details. >>> "R. Michael Weylandt" 2011/12/07 09:27:38 PM >>> >>> " I'm not creating a sector' Exactly, but your code

Re: [R] Help! I couldn't put multiple qplot on the same page...

2011-12-07 Thread Michael
I found that if I run each "qplot" manually it would plot out something... but if I put it into the loop, it just doesn't work at all - sometimes it refused to plot anything... On 12/7/11, Michael wrote: > If I put a "windows()" in front of the qplot command in the above code > and simply wante

Re: [R] Help! I couldn't put multiple qplot on the same page...

2011-12-07 Thread Michael
If I put a "windows()" in front of the qplot command in the above code and simply wanted to have each plot graphed on different pages... Six graph windows opened but none of them had any content... they are all blank... What's the problem? Thx On 12/7/11, Michael wrote: > Hi all, > > I am st

Re: [R] nice report generator?

2011-12-07 Thread Yihui Xie
Could you show us a few screenshots of what you believe are "good-looking Excel 2010 tables"? (e.g. via imgur.com) Sorry I do not have Excel 2010. I feel this post is more like a matter of style, so it is likely to be a personal matter of taste. Anyway, I'd like to see what is a beautiful table in

Re: [R] nice report generator?

2011-12-07 Thread Richard M. Heiberger
Michael, that is a challenge. I accept it and suggest that it be a contest on the R-help list. Please post a pdf file showing some (more than one) tables that you think look better in Excel than in LaTeX. I,and probably some others, will send our versions of the tables. I think a new email thre

Re: [R] data frame and cumulative sum

2011-12-07 Thread R. Michael Weylandt
??"cumulative sum" would almost certainly lead you to cumsum with only a modicum of effort Michael On Wed, Dec 7, 2011 at 5:13 PM, Giovanni Azua wrote: > Hello, > > I have a data frame that looks like this (containing interarrival times): > >> str(df) > 'data.frame':   18233 obs. of  1 variable:

Re: [R] nice report generator?

2011-12-07 Thread Michael
Thanks Liviu. I actually knew Latex... so it's not a problem for me. But honestly Latex tables cannot compete with Excel 2010 tables in looks... the latter are for business users and for managers... I am looking for a fast/convenient way to generate those tables... Thanks! On 12/7/11, Liviu And

[R] Help! I couldn't put multiple qplot on the same page...

2011-12-07 Thread Michael
Hi all, I am stuck at ploting multiple graphs on one page. I don't why it doesn't work. All the 6 plots are either exactly the same, or they simply don't plot at all. I made sure that in each iteration the "datasub" and "factorsub" are different ... Could you please help me? Thanks a lot! I di

[R] data frame and cumulative sum

2011-12-07 Thread Giovanni Azua
Hello, I have a data frame that looks like this (containing interarrival times): > str(df) 'data.frame': 18233 obs. of 1 variable: $ Interarrival: int 135 806 117 4 14 1 9 104 169 0 ... > head(df) Interarrival 1 135 2 806 3 117 44 5 14 6

Re: [R] read.table performance

2011-12-07 Thread peter dalgaard
On Dec 7, 2011, at 22:37 , R. Michael Weylandt wrote: > R 2.13.2 on Mac OS X 10.5.8 takes about 1.8s to read the file > verbatim: system.time(read.table("test2.txt")) About 2.3s with 2.14 on a 1.86 GHz MacBook Air 10.6.8. Gene, are you by any chance storing the file in a heavily virus-scanned

Re: [R] Time series merge?

2011-12-07 Thread Jeffrey J. Hallman
Or see "mergeSeries" in package 'tis'. -- Jeff __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained,

Re: [R] Plotting Time Series Data by Month

2011-12-07 Thread Jeffrey J. Hallman
If you can wait a day or two, the next version (1.18) of the 'tis' package that I will put on CRAN very soon has a function called "tierChart" that does what you want with a 'tis' series. -- Jeff __ R-help@r-project.org mailing list https://stat.ethz.c

Re: [R] read.table performance

2011-12-07 Thread R. Michael Weylandt
R 2.13.2 on Mac OS X 10.5.8 takes about 1.8s to read the file verbatim: system.time(read.table("test2.txt")) Michael 2011/12/7 Gene Leynes : > Peter, > > You're quite right; it's nearly impossible to make progress without a > working example. > > I created an ** extremely simplified ** example fo

Re: [R] Problem with xlsx package

2011-12-07 Thread jim holtman
I have had better luck with the XLConnect package. On Wed, Dec 7, 2011 at 3:45 PM, R. Michael Weylandt wrote: > And did you try giving more memory to the JVM as suggested above? I'd > imagine that if you have the same problem and the same error, you > would expect to get the same advice directed

Re: [R] nice report generator?

2011-12-07 Thread Liviu Andronic
On Wed, Dec 7, 2011 at 7:43 PM, Janko Thyson wrote: > I like knitr. IMHO Yihui really came up with a killer package there: > http://yihui.github.com/knitr/ > If we're talking about nice, I'll chip in for LyX. It has support for Sweave, and will soon support knitr. This eliminates (most of) the bur

Re: [R] Problem with xlsx package

2011-12-07 Thread R. Michael Weylandt
And did you try giving more memory to the JVM as suggested above? I'd imagine that if you have the same problem and the same error, you would expect to get the same advice directed at the same solution. Otherwise, I'd personally plug the XLConnect package over xlsx. I switched to it recently and h

Re: [R] axis thickness in plot()

2011-12-07 Thread Greg Snow
Often when someone wants lines (axes) in R plots to be thicker or thinner it is because they are producing the plots at the wrong size, then changing the size of the plot in some other program (like MSword) and the lines do not look as nice. If this is your case, then the better approach is to

Re: [R] Output table from for loop

2011-12-07 Thread R. Michael Weylandt
I'd do it like this: nums = 10:30 OutList <- vector("list", length(nums)) # The key is that you need to return in a list: your loop iterations were all operating on the same object OutMat and accessing different elements thereof instead of creating new objects for(cn in seq_along(nums)) OutList[

Re: [R] nice report generator?

2011-12-07 Thread Abhijit Dasgupta
Sarah Goslee might want to chime in, but using odfWeave and appropriate LibreOffice templates, you can generate beautifully formatted tables, possibly in the style you wish, in LibreOffice, as well as add R figures. The R2wd package (which has a proprietary component) will also generate tables

[R] confusion about factor scores from princomp function

2011-12-07 Thread Larry D'Agostino
If I calculate factor scores with princomp() I don't get the same factor scores using eigen() method. fctscr1 <- princomp(USArrests, cor=T)$scores fctscr2 <- scale(as.matrix(USArrests)) %*% eigen(cor(USArrests))$vectors identical(fctscr1,fctscr2) # results in FALSE The values are close but

Re: [R] Select a set of rows based on a condition

2011-12-07 Thread R. Michael Weylandt
If you know the index letters are unique. df <- data.frame(indx = LETTERS[1:7], levels = sample(7)) ind1 <- which(df$indx == "A") ind2 <- which(df$indx == "B") df[ind1:ind2, ] Michael On Wed, Dec 7, 2011 at 6:23 AM, RaoulD wrote: > Hi, > > I need help with selecting a set of rows from a colum

Re: [R] using sample

2011-12-07 Thread Justin Haynes
Emma, If you haven't spent much time on the r-help forums, please do read the posting guide. You need to provide reproducible examples for us to help you. We don't know anything about your data... what is event.details, (if you can't provide the data often ?str will do) since I don't know what

Re: [R] How to de-source and re-source a file?

2011-12-07 Thread Roebuck,Paul L
So create a checkpoint... -myfile.R- checkpoint.file <- "checkpoint_appname.RData" if (!file.exists(checkpoint.file) { ## Do compute intensive processing... { my.seed <- 1234 ans <- long.comp( my.seed) } objects2save <-

Re: [R] nice report generator?

2011-12-07 Thread Michael
Thanks a lot Duncan! I did some home-work and found out that in terms of table looks, it's neater to generate Excel 2010 style colorful tables, not the Latex style plain/math-geek tables... Therefore, a report generator would hopefully generate Excel 2010 style tables, plus R plots, etc. Any tho

Re: [R] How to scale arrows to approximately fill a plot region?

2011-12-07 Thread Uwe Ligges
On 07.12.2011 18:52, Michael Friendly wrote: In a variety of graphic applications, I plot some data, together with arrows representing variables or linear transformations of variables as vectors in the same space, as in a biplot. In my applications, the scale of the arrows is arbitrary -- all

Re: [R] nice report generator?

2011-12-07 Thread Nutter, Benjamin
With any sort of reproducible report, you'll have to 'manually place' all of the tables and figures at least once. If done well, however, you'll only have to ever do it once. I'm not an Sweave expert (yet, regrettably), but using lazyWeave, you could generate a customized ANOVA table using t

Re: [R] select integer intervals from a integer space

2011-12-07 Thread Mao Jianfeng
Dear Gene, Thanks a lot for your kindness. > isp <- data.frame(begin=c(1,5,6,15,31,51,102), end=c(7,9,13,21,49,52,109)) > isp > ints = apply(isp, 1, function(x)seq(x[1],x[2])) > ints > ints = do.call(c, ints) > ints > ## option to fix if the regions are overlapping > ## and you don't want overlap

Re: [R] nice report generator?

2011-12-07 Thread Duncan Murdoch
On 07/12/2011 1:14 PM, Michael wrote: Hi all, I am looking for recommendations/pointers about best report generator you think that are currently available? i.e. the package that can help turn console output into nice-looking neat report to send to bosses? You might find the latex() command in

Re: [R] running texi2dvi without running bibtex

2011-12-07 Thread Duncan Murdoch
On 07/12/2011 12:24 PM, Aidan Corcoran wrote: Hi Duncan, thanks for your help. Unfortunately texi2dvi("onepager", pdf = TRUE, texi2dvi = "pdflatex") seems to run into the same issue. I searched the documentation as you suggested (http://docs.miktex.org/2.9/manual/pdftex.html) and also check

Re: [R] Convert a string to a variable name

2011-12-07 Thread Uwe Ligges
On 07.12.2011 20:15, Jeffrey Fuerte wrote: Hello, I am trying to ask the user for which column their data is in, and then use this information in a function. So far I have: data<- read.csv(file.choose(), header=TRUE) col<- (winDialogString("Which column contains your data?","")) and I want

Re: [R] axis line width in boxplots

2011-12-07 Thread Uwe Ligges
On 07.12.2011 17:51, GINGINS Simon wrote: Dear R-helpers, I've produced boxplots for a publication but I have a visual problem that I don't mamage to fix. For visual reasons, I reduced the line width with "lwd=0.5". It works nicely for all the lines (frame of the plot, boxes, notches and med

Re: [R] Raster:matrix rows as x dimension

2011-12-07 Thread Uwe Ligges
On 07.12.2011 16:13, senplanet wrote: Hello, I am new in R. I have problem to plot raster plot. My data file consists 24 columns and approximately 18000 rows. I would like to create some kind of hovmuller plot. so I did: r<- raster("test", package="raster") but it automatically uses columns fo

Re: [R] select integer intervals from a integer space

2011-12-07 Thread Gene Leynes
Possibly not the absolutely most efficient answer, but this is probably an answer nonetheless (David, hope I'm not encouraging bad behavior by replying.) isp <- data.frame(begin=c(1,5,6,15,31,51,102), end=c(7,9,13,21,49,52,109)) isp ints = apply(isp, 1, function(x)seq(x[1],x[2])) ints ints = do.ca

Re: [R] Object xxx not found

2011-12-07 Thread Sarah Goslee
You should probably read some of the intro to R documents, as this is a critical component of using R. On Wed, Dec 7, 2011 at 7:06 AM, John Visagie wrote: > Dear All, > > I am having a very basic error, but somehow do not know how to resolve it.   > I've read a dataset in .csv into R with two col

Re: [R] nice time series viewer?

2011-12-07 Thread R. Michael Weylandt
plot.xts() chartSeries() if you are using financial data? It's going to depend on your (unstated) form of time series, but generally R isn't set up for interactive graphics. (chartSeries being the only time-series specific exception I know; you can also do Rgl and Rggobi stuff with a little bit o

Re: [R] reading partial data set

2011-12-07 Thread Peter Langfelder
On Wed, Dec 7, 2011 at 6:52 AM, bcdc wrote: > Hi all, > > I'm trying to read a data set into R, but the file is messy, so I have to do > it partially. The whole data is in a .txt file, and the values are separated > by a space. So far ok. The problem is that in this file, not all the lines > have

Re: [R] nice report generator?

2011-12-07 Thread Sarah Goslee
On Wed, Dec 7, 2011 at 1:50 PM, Michael wrote: > Thanks a lot! > > Typically the console output will be something like this: > > Analysis of Variance Table > > Response: as.double(my.delta) >             Df Sum Sq Mean Sq F value Pr(>F) > my.factor    1      0   0.005   2e-04  0.988 > Residuals  1

[R] Convert a string to a variable name

2011-12-07 Thread Jeffrey Fuerte
Hello, I am trying to ask the user for which column their data is in, and then use this information in a function. So far I have: data <- read.csv(file.choose(), header=TRUE) col <- (winDialogString("Which column contains your data?","")) and I want to be able to reference such as: meas <- dat

Re: [R] args() function does not list function prototype for locally-produced/installed R package

2011-12-07 Thread Rick Reeves
Duncan: Indeed, adding the function names to the NAMESPACE file (in the form: export(functionName)) solved the problem, and the args() function displays the function argument lists. Thanks, Rick Reeves On 12/5/2011 2:49 PM, Duncan Murdoch wrote: On 11-12-05 3:04 PM, Rick Reeves wrote: > Gree

Re: [R] Object xxx not found

2011-12-07 Thread R. Michael Weylandt
" I'm not creating a sector' Exactly, but your code (sector$exports) tells R to "find a variable called sector and then look inside of it for something called exports". It never bothers with the second part because it can't execute the first because it can't find anything called sector (as the err

[R] survreg() provides same results with different distirbutions for left censored data

2011-12-07 Thread ifejobi
Hello, I'm working with some left censored survival data using accelerated failure time models. I am interested in fitting different distributions to the data but seem to be getting the same results from the model fit using survreg regardless of the assumed distribution. These two codes seem to

Re: [R] Hist and extra space

2011-12-07 Thread Uwe Ligges
On 07.12.2011 15:30, Filoche wrote: Hi everyone. I have an histogram like this one: http://imageshack.us/photo/my-images/442/dfsdfsdj.jpg/ I would like to remove the extra space under the histogram so it "touch" the x axis. Is it possible? Here's my code. See ?par and its argument yaxs.

Re: [R] Problem with xlsx package

2011-12-07 Thread sakaton
I have the same problem and same Java error. > sessionInfo() R version 2.13.1 (2011-07-08) Platform: x86_64-pc-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C

Re: [R] Object xxx not found

2011-12-07 Thread Uwe Ligges
On 07.12.2011 13:06, John Visagie wrote: Dear All, I am having a very basic error, but somehow do not know how to resolve it. I've read a dataset in .csv into R with two columns - sector, export. When trying to plot the data it says "sector not found" This is the formula. SouthAfrica<-

[R] reading partial data set

2011-12-07 Thread bcdc
Hi all, I'm trying to read a data set into R, but the file is messy, so I have to do it partially. The whole data is in a .txt file, and the values are separated by a space. So far ok. The problem is that in this file, not all the lines have the same number of elements, and the reading stops. And

Re: [R] Object xxx not found

2011-12-07 Thread R. Michael Weylandt
You never create a "sector" object inR so it can't be found. Perhaps you meant hist(SouthAfrica$exports) Michael On Dec 7, 2011, at 7:06 AM, "John Visagie" wrote: > Dear All, > > I am having a very basic error, but somehow do not know how to resolve it. > I've read a dataset in .csv into

[R] Hist and extra space

2011-12-07 Thread Filoche
Hi everyone. I have an histogram like this one: http://imageshack.us/photo/my-images/442/dfsdfsdj.jpg/ I would like to remove the extra space under the histogram so it "touch" the x axis. Is it possible? Here's my code. hist(X, freq = F, col = 'gray', axes = FALSE) abline(v = cyano_euk_min, col

[R] nice time series viewer?

2011-12-07 Thread Michael
Hi all, I am looking for a nice time series grapher/viewer in R ... with the feature of scrolling, zooming, etc. Hopefully it could be of the quality at the report-generation-and-sending-to-boss level... Could anybody please give me some recommendations/pointers? Thanks a lot!

[R] fuctional iteration.....

2011-12-07 Thread jurassic85
g(x)=1+1/x-log(x) g(x)=0 => f(x)=g(x)+x=x I want to solve this problem(x) by "fucntional iteration" method plz... -- View this message in context: http://r.789695.n4.nabble.com/fuctional-iteration-tp4168737p4168737.html Sent from the R help mailing list archive at Nabble.com. ___

[R] using sample

2011-12-07 Thread bevare
Hi, Can anyone help sort out the problem with the following script - I am a R newbie and I am self taught. obs.all = c() for(i in 1:386){ if (n.sim[i]>0){ obs = (1:133429)[event.details[,2] == i] obs.all = c(obs.all, sample(obs[obs < n.sim[i]], size = n.sim[i],

[R] Select a set of rows based on a condition

2011-12-07 Thread RaoulD
Hi, I need help with selecting a set of rows from a column in a dataset, that matches a string criteria - start and end. The dataset is : List|Index 10 ABC 20 DEF 10 GHI 50 JKL40 MNO

[R] axis line width in boxplots

2011-12-07 Thread GINGINS Simon
Dear R-helpers, I've produced boxplots for a publication but I have a visual problem that I don't mamage to fix. For visual reasons, I reduced the line width with "lwd=0.5". It works nicely for all the lines (frame of the plot, boxes, notches and medians) exept for the axis line. Thus the two a

[R] PLSA Algorithm in R

2011-12-07 Thread rahulthewall
Hello everyone, Newbie here (both in terms of R, and in my knowledge of statistics). I need to run LDA and PLSA on a set of data that I have. While I have managed to find a package for LDA, I have not been able to find anything for PLSA. There is a package for LSA, but I am not sure whether I can

[R] Output table from for loop

2011-12-07 Thread bmoran
Hi, this might be basic but can't get it to work and it is hampering my R usage: #the loop is checking variance of rows, and cutting out rows with var>numVec[i] #I define outMat as object names I want to output to (does this make sense? how else #can I define sequential numbered output?) #numVec i

  1   2   >