Re: [R] HTML Forms to R

2011-12-07 Thread Tal Galili
Hi Ravi, Have a look at these two: http://www.r-statistics.com/2010/02/r-web-application-hello-world-using-rapache-7min-video-tutorial/ http://www.r-statistics.com/2010/02/web-development-with-r-an-hd-video-tutorial-of-jeroen-ooms-talk/ Contact

[R] EM Algorithm for missing data

2011-12-07 Thread Sudhi.Upadhyaya
Dear all, I need help with EM algorithm. I am modeling this alogirthm based on Incomplete Data in Generalized Linear Models by Joseph G Ibrahim. i have half way through developing the R code based on this this paper, I need little help in tweaking my code furthure.

[R] Help to get fitted and residual value

2011-12-07 Thread arunkumar1111
Data- read.csv(C:/FE and RE.csv) Formula=Y~X2+X3+X4 + X5+X6 fit=lm(formula=Formula,data=Data) My sample Data State Year Y X2 X3 X4 X5 X6 S2 1960 27.8 397.5 42.2 50.7 78.3 65.8 S1 1960 29.9 413.3 38.1 52 79.2 66.9 S2 1961 29.8 439.2 40.3 54 79.2 67.8 S1 1961 30.8 459.7 39.5 55.3 79.2 69.6 Is

Re: [R] Memory getting eaten up with XML

2011-12-07 Thread Andrew Gormley
Today I tried the code on a MacBook and experienced the same problem. Which makes me think there is something wrong with the way I am trying to free up the memory...? Andrew Andrew Gormley wrote Hi all. I have an issue that I cannot resolve. I am trying to read in lots of data that are

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

2011-12-07 Thread Eric Fail
Dear list, I have been struggling with this for some time now, and for the last hour I have been struggling to make a working example for the list. I hope someone out there have some experience with plotting longitudinal data that they will share. My data is some patient data with three

Re: [R] Help to get fitted and residual value

2011-12-07 Thread Mohamed Lajnef
Hi arunkumar; fit$residuals , fit$fitted to extract respectively residuals and fitted values Regrads Mohamed Le 07/12/11 07:20, arunkumar a écrit : Data- read.csv(C:/FE and RE.csv) Formula=Y~X2+X3+X4 + X5+X6 fit=lm(formula=Formula,data=Data) My sample Data State Year Y X2 X3 X4 X5

[R] curve fitted ... how to retreive data

2011-12-07 Thread Mintewab Bezabih
Dear R users, I have now managed to fit the curve using the thin plate spline as follows: library(mgcv) b - gam(y~s(x1,x2,k=100),data =dat) vis.gam(b) What I want now is to get the fitted data for y and copy it so that I use it for further analysis. Many thanks in advance mintewab

Re: [R] Help to get fitted and residual value

2011-12-07 Thread Mohammed Ouassou
Hei, i) get names of object returned by lm(). in this case fit names(fit) output from command : names(fit) [1] coefficients residuals effects rank [5] fitted.values assignqrdf.residual [9] contrasts xlevels call terms

[R] arules package intsallation

2011-12-07 Thread Thomas Chesney
I'm using R version 2.13.0 (2011-04-13) on Mac OS X and I get the following error message with library(arules): Loading required package: Matrix Loading required package: lattice Attaching package: 'Matrix' The following object(s) are masked from 'package:base': det Error in

Re: [R] arules package intsallation

2011-12-07 Thread Uwe Ligges
On 07.12.2011 10:54, Thomas Chesney wrote: I'm using R version 2.13.0 (2011-04-13) on Mac OS X and I get the following error message with library(arules): Loading required package: Matrix Loading required package: lattice Attaching package: 'Matrix' The following object(s) are masked

Re: [R] any R-Revolution users here? How to make Revolution portable?

2011-12-07 Thread Uwe Ligges
On 06.12.2011 23:14, Michael wrote: How to make a portable version of Revolution R? I just wanted to be able to carry it anywhere I go in a USB drive... I don't need fancy functionalities, just need the visual debugger therein... btw, Windows or Linux doesn't matter... Any thoughts? Yes:

Re: [R] Help to get fitted and residual value

2011-12-07 Thread Petr PIKAL
Hi Hei, i) get names of object returned by lm(). in this case fit names(fit) output from command : names(fit) [1] coefficients residuals effects rank [5] fitted.values assignqrdf.residual [9] contrasts xlevels call

Re: [R] arules package intsallation

2011-12-07 Thread Prof Brian Ripley
On Wed, 7 Dec 2011, Thomas Chesney wrote: I'm using R version 2.13.0 (2011-04-13) on Mac OS X and I get the following error message with library(arules): Well somehow you used a version of arules built for R 2.14.0. Try the build for R 2.13.x. And please note that R-sig-mac is the list

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

2011-12-07 Thread Jim Lemon
On 12/07/2011 08:02 PM, Eric Fail wrote: Dear list, I have been struggling with this for some time now, and for the last hour I have been struggling to make a working example for the list. I hope someone out there have some experience with plotting longitudinal data that they will share.

[R] removing specified length of text after a period in dataframe of char's

2011-12-07 Thread Aidan Corcoran
Dear all, I'm trying to remove some text after the period (a decimal point) in the data frame 'hi', below. This is one step in formatting a table. So I would like e.g. 2.0 to become 2 and 5.3 to be 5.3, where the variable digordered contains the number of digits after the decimal that I would

Re: [R] arules package intsallation

2011-12-07 Thread Thomas Chesney
From: Prof Brian Ripley [rip...@stats.ox.ac.uk] Sent: Wednesday, December 07, 2011 10:45 AM To: Thomas Chesney Cc: r-help@r-project.org Subject: Re: [R] arules package intsallation On Wed, 7 Dec 2011, Thomas Chesney wrote: I'm using R version 2.13.0

Re: [R] read.table performance

2011-12-07 Thread jim holtman
Here is a test that I ran where the difference was rather the data was in a single column or 3700 columns. If in a single column, the 'scan' and 'read.table' were comparable; with 3700 columns, read.table took 3X longer. using 'colClasses' did not make a difference: x.n -

[R] running texi2dvi without running bibtex

2011-12-07 Thread Aidan Corcoran
Dear all, I was hoping someone may know a way of running texi2dvi while ignoring bibtex errors, or any other work around (such as not running bibtex at all, if possible). The context is that I have an R program that does some calculations and writes a table into various folders, one per country

Re: [R] removing specified length of text after a period in dataframe of char's

2011-12-07 Thread Sarah Goslee
Hi, Example data is crucial, but small simple example data is even better. I'm too lazy to figure out which bits I need from your data, so here's a simple example of one way to approach your question. You could use gsub() in very much the same manner if you need more complex output. testdata -

Re: [R] making changes to global variables in functions

2011-12-07 Thread Janko Thyson
Basically, I see two options here: 1) Using environments # Temp environment env - new.env(parent=emptyenv()) env$state1 - list(n=100, won=0) env$state2 - list(n=100, won=0) fight2 - function(stateA, stateB, envir){ # get(stateA, envir=envir)$n - 50 # The above is what you would want to

Re: [R] questions about scatterplotMatrix

2011-12-07 Thread John Fox
Dear Wendy, This must be the scatterplotMatrix() function in the car package. If I understand correctly what you want, the following should do it: scatterplotMatrix(~ income + education + prestige, smooth = FALSE, data=Duncan, diagonal=none, reg.line=function(...) abline(0,1),

Re: [R] removing specified length of text after a period in dataframe of char's

2011-12-07 Thread Aidan Corcoran
Hi Sarah, apologies for the excess. A smaller example: f-structure(list(c(GDP per capita (LCU), Ratio to EZ GDP Per Cap ), `2005` = c(32128, 0.1), `2009` = c(52163, 0.1), `2010` = c(63100, 0.1), `2011` = c(72461, 0.1), `2012` = c(81313, 0.1)), .Names = c(, 2005, 2009, 2010, 2011, 2012),

Re: [R] removing specified length of text after a period in dataframe of char's

2011-12-07 Thread Sarah Goslee
Hi, If you really wanted precision (significant figures) rather than decimal places, it would be easy: format() handles that, I believe. Your original email said you'd been reading about regular expressions; continuing that reading will lead you to the meaning of the cryptic ^ and all the \. As

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

2011-12-07 Thread Hadley Wickham
On Wed, Dec 7, 2011 at 4:02 AM, Eric Fail eric.f...@gmx.us wrote:  Dear list, I have been struggling with this for some time now, and for the last hour I have been struggling to make a working example for the list. I hope someone out there have some experience with plotting longitudinal

[R] maximum number of files to choose with tk_choose.files ?

2011-12-07 Thread cristabel.duran
Dear R-list, I am running a script in which I calculate and create new files from orginal ones. As I have a large number of files to process, I automatize this calculation with a loop. First, I am choosing the files to work with. This is done by using: Files - if(interactive())

Re: [R] removing specified length of text after a period in dataframe of char's

2011-12-07 Thread Aidan Corcoran
Hi Sarah, this is a neat solution. Thanks very much for your help, and your patience with my poorly posed questions. I've learned a lot from your approach. best regards, Aidan On Wed, Dec 7, 2011 at 1:40 PM, Sarah Goslee sarah.gos...@gmail.com wrote: Hi, If you really wanted precision

[R] select integer intervals from a integer space

2011-12-07 Thread Mao Jianfeng
Dear r-helpers, I have an one-dimensional integer space (defined by random integer intervals, which overlapped each other or not). I would like to select consecutive integer intervals with specific intra and inter length. Here, an integer interval means a set of consecutive increasing integers,

Re: [R] running texi2dvi without running bibtex

2011-12-07 Thread Duncan Murdoch
On 07/12/2011 6:47 AM, Aidan Corcoran wrote: Dear all, I was hoping someone may know a way of running texi2dvi while ignoring bibtex errors, or any other work around (such as not running bibtex at all, if possible). The context is that I have an R program that does some calculations and writes

Re: [R] making changes to global variables in functions

2011-12-07 Thread Bert Gunter
None of this pass by reference complexity is necessary. Here's how to do it without references or environments. A - list(n=100,won=0) B - list(n=100,won=0) f - function(x,y) { nmx - deparse(substitute(x)) nmy - deparse(substitute(y)) x$n -50; y$n - 50

Re: [R] scatterplotting stock returns using quantmod and pairs()

2011-12-07 Thread R. Michael Weylandt
The names of the list entries are not the same as the column names of the elements of the list (if that makes any sense)...you need to add them manually after the merge: this works library(quantmod) tickers - c(SHY,TLT,SPY,IWM,GLD,IEV) getSymbols(tickers) AdjCloseReturns - do.call(merge,

Re: [R] help wrapping findInterval into a function

2011-12-07 Thread R. Michael Weylandt
Can't this be fixed by switching with to within? E.g., x = data.frame(a = 1:3, b = 4:6) AddRowSums - function(df) within(df, d - a + b) x - AddRowSums(x) print(x) Michael On Wed, Dec 7, 2011 at 12:07 AM, David Winsemius dwinsem...@comcast.net wrote: On Dec 6, 2011, at 5:53 PM, Steve E.

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

2011-12-07 Thread David Winsemius
On Dec 7, 2011, at 10:11 AM, Mao Jianfeng wrote: Dear r-helpers, I have an one-dimensional integer space (defined by random integer intervals, which overlapped each other or not). I would like to select consecutive integer intervals with specific intra and inter length. Here, an integer

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

2011-12-07 Thread Mao Jianfeng
Dear David, Thanks for your response and warnings. I will obey the rule and be a good citizen. Best, Jian-Feng, Because you have a poorly posted problem. As far as I can tell you have not yet responded constructively to the attempts at clarification of the problem. Cross-posting to this list

[R] Hinton Diagram for a matrix of weights

2011-12-07 Thread Xavier Fernández i Marín
Hello, Although I have used a general search engine, r-seek, and browsed CRAN for contributed packages and R Gallery, I have not been able to find an implementation of Hinton Diagrams for representing weighting matrices using R. Does anyone knows a way of plotting weighting matrices in R?

Re: [R] running texi2dvi without running bibtex

2011-12-07 Thread Aidan Corcoran
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 checked pdflatex --help, but can't find a command line

Re: [R] making changes to global variables in functions

2011-12-07 Thread William Dunlap
A third option is to put your state objects in a list and write a replacement function to modify the state of each. E.g., `n-` - function(state, value) { state[[n]] - value state } n - function(state) state[[n]] states - list( list(n=100, won=0), list(n=101, won=1) ) for(i

[R] RSPython installation

2011-12-07 Thread Gene Leynes
Does anyone know if Is there a way to manually install RSPython? I get this error when I try to run the script from my DOS prompt. V:\R CMD INSTALL -c C:/Users/gene.leynes/Downloads/RSPython_0.7-1.tar.gz * installing to library 'C:/Users/gene.leynes/Documents/R/win-library/2.13' * installing

Re: [R] Problem with xlsx package

2011-12-07 Thread B77S
If all else fails, open it in Excel... save as .csv read.csv() Nikhil Joshi wrote I am trying to read an xlsx spreadsheet (1506 rows, 501columns) all populated but getting the following error: Please advise as to how to get around this issue. res - read.xlsx(c:\\BSE_v2.xlsx,1) Error

Re: [R] curve fitted ... how to retreive data

2011-12-07 Thread Gene Leynes
For the components: result = predict(b, type=terms) For the total fit: result = predict(b) result = b$fitted.values On Wed, Dec 7, 2011 at 3:24 AM, Mintewab Bezabih mintewab.beza...@economics.gu.se wrote: Dear R users, I have now managed to fit the curve using the thin plate spline as

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

2011-12-07 Thread Michael Friendly
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 that matters is relative length. I'd like to

[R] generalized procrustes analysis without translation

2011-12-07 Thread Mark Heckmann
I am searching for a GPA function/algorithm that allows to omit translation of matrices. procGPA in the shapes package does not have this option. I need scaling, rotation and reflection but no translation as my matrices are naturally centered. I am not sure if GPA from FactoMineR might be used

[R] nice report generator?

2011-12-07 Thread Michael
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? thanks a lot! [[alternative HTML version deleted]]

Re: [R] nice report generator?

2011-12-07 Thread Steve Lianoglou
Hi, On Wed, Dec 7, 2011 at 1:14 PM, Michael comtech@gmail.com 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?

Re: [R] nice report generator?

2011-12-07 Thread Sarah Goslee
Sweave. Or ODFWeave, if Sweave/LaTeX are too much overhead. But really, it depends on what kind of report output you need to deliver. Printed? HTML? PDF? Sarah On Wed, Dec 7, 2011 at 1:14 PM, Michael comtech@gmail.com wrote: Hi all, I am looking for recommendations/pointers about best

Re: [R] nice report generator?

2011-12-07 Thread Janko Thyson
I like knitr. IMHO Yihui really came up with a killer package there: http://yihui.github.com/knitr/ On 07.12.2011 19:19, Sarah Goslee wrote: Sweave. Or ODFWeave, if Sweave/LaTeX are too much overhead. But really, it depends on what kind of report output you need to deliver. Printed? HTML?

Re: [R] adding hyperlinked text to pdf plot

2011-12-07 Thread David M. Schruth
Hi Justin, It sounds like you might be able to use the 'hyperplot()' function (in the 'caroline' package) for creating an html imagemap around your figure. This is assuming all that you want to do is interactivate a 2-dimensional scatter plot. You'd also lose PDF-pagination but the

Re: [R] nice report generator?

2011-12-07 Thread Michael
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.factor1 0 0.005 2e-04 0.988 Residuals 1484 32630 21.988 I am looking for a report-generator to make

[R] Object xxx not found

2011-12-07 Thread John Visagie
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-read.csv(c,header=T)

[R] Raster:matrix rows as x dimension

2011-12-07 Thread senplanet
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 for x-dimension and rows for y-dimension. Is

Re: [R] axis thickness in plot()

2011-12-07 Thread AlexC
RESOLVED dear Peter thank you for your quick response naturally, I was trying lwd before using lwd.axis, the only reason i tried lwd.axis is because lwd wasn't working yesterday. I restarted R today and for some reason the exact same script, with the lwd argument, that gave me the lwd error

[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 varnumVec[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

[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] 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

[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 : variable Name Value List|Index 10 ABC 20 DEF 10 GHI 50 JKL

[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] 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] 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] 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

Re: [R] Object xxx not found

2011-12-07 Thread R. Michael Weylandt michael.weyla...@gmail.com
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 john.visa...@up.ac.za wrote: Dear All, I am having a very basic error, but somehow do not know how to resolve it. I've read a dataset

[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 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.

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] 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.

[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] 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 error

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:

[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 - data$col

Re: [R] nice report generator?

2011-12-07 Thread Sarah Goslee
On Wed, Dec 7, 2011 at 1:50 PM, Michael comtech@gmail.com 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

Re: [R] reading partial data set

2011-12-07 Thread Peter Langfelder
On Wed, Dec 7, 2011 at 6:52 AM, bcdc bia@gmail.com 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

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

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 john.visa...@up.ac.za 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

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 =

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 for

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

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 to be

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 checked

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

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 overlapping

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

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 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

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] 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

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 raoul.t.dso...@gmail.com wrote: Hi, I need help with selecting a set of

[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] 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

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))

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] 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

Re: [R] nice report generator?

2011-12-07 Thread Liviu Andronic
On Wed, Dec 7, 2011 at 7:43 PM, Janko Thyson janko.thyson.rst...@googlemail.com 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.

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 michael.weyla...@gmail.com 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

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 gley...@gmail.com: Peter, You're quite right; it's nearly impossible to make progress without a working example. I created an ** extremely simplified **

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

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] 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

[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

[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 did

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

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 brave...@gmail.com wrote: Hello, I have a data frame that looks like this (containing interarrival times): str(df) 'data.frame':   18233 obs. of  1

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

  1   2   >