Re: [R] SQL/R

2010-07-23 Thread Gildas Mazo
Thanks for your answers, Best, Gildas Brian Diggs a écrit : On 7/22/2010 5:01 AM, Allan Engelhardt wrote: There are so many ways Here is one: aggregate(v ~ u, data=X, function(...) length(unique(...))) # u v # 1 T1 2 # 2 T2 1 Hope this helps Here is one other way, using the

[R] ROpenOffice (which requires Rcompression)

2010-07-23 Thread soeren . vogel
Hello, for my data preparation and administration (data, labels, etc.) I use OpenOffice.org ODS spreadsheet files with several sheets in one file. However, I find it inconvenient to export every single sheet to a csv file whenever I apply changes to the labelling or so, and I haven't found a

[R] calculate slope of line

2010-07-23 Thread Katrin Fleischer
Dear All, I fear that this is a really easy question but I do seem to go around in circles.. I have 2 points on a plot and would like to calculate the slope of the line drawn through these 2 points. that cant be so hard?! Thank you in advance, Katrin -- Katrin Fleischer Vrije Universiteit

Re: [R] Hydrology plots in R

2010-07-23 Thread Jim Lemon
On 07/23/2010 12:56 AM, Sam Albers wrote: Hello, I am trying to create a plot often seen in hydrodynamic work than includes a contour plot representing the water speed with arrows pointing in the direction of flow. Does anyone have any idea how I might add arrows based on wf$angle (in the

[R] start and end times to yes/no in certain intervall

2010-07-23 Thread Stefan Uhmann
Hi List, I have start and end times of events structure(list(start = c(15:00, 15:00, 15:00, 11:00, 14:00, 14:00, 15:00, 12:00, 12:00, 12:00, 12:00, 12:00, 12:00, 12:00, 12:00, 12:00, 12:00, 12:00, 12:00, 12:00), end = c(16:00, 16:00, 16:00, 12:00, 16:00, 15:00, 16:00, 13:00, 13:00, 13:00,

[R] How to import simple java/mathematica expression to R

2010-07-23 Thread Andrey Siver
Hello, Is it possible to import some (large enough) polynomial expression from java (or mathematica) to R as a function? I found very interesting package rJava but I did not see this feature there. We used Mathematica as calculation engine for our program with statistical calculations and now

[R] auto.arima

2010-07-23 Thread nuncio m
HI list, I am using auto.arima from forecast package, I wonder whether its possible to save model orders to a seperate file Thanks nuncio -- Nuncio.M Research Scientist National Center for Antarctic and Ocean research Head land Sada Vasco da Gamma Goa-403804 [[alternative HTML

Re: [R] Hydrology plots in R

2010-07-23 Thread Deepayan Sarkar
On Thu, Jul 22, 2010 at 7:56 AM, Sam Albers tonightstheni...@gmail.com wrote: Hello, I am trying to create a plot often seen in hydrodynamic work than includes a contour plot representing the water speed with arrows pointing in the direction of flow. Does anyone have any idea how I might add

Re: [R] calculate slope of line

2010-07-23 Thread Ted Harding
On 23-Jul-10 09:46:28, Katrin Fleischer wrote: Dear All, I fear that this is a really easy question but I do seem to go around in circles.. I have 2 points on a plot and would like to calculate the slope of the line drawn through these 2 points. that cant be so hard?! Thank you in

[R] Midpoint between coordinates

2010-07-23 Thread Mafalda Viana
Dear R users, I need to find the coordinates for the point (midpoint) located half way between two pairs of coordinates (lon1,lat1 and lon2,lat2) assuming a straight line between them. What would be the best way? I tried to find an answer in the help archives but without success. I would greatly

Re: [R] Question about a perceived irregularity in R syntax

2010-07-23 Thread Duncan Murdoch
Nordlund, Dan (DSHS/RDA) wrote: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Peter Dalgaard Sent: Thursday, July 22, 2010 3:13 PM To: Pat Schmitz Cc: r-help@r-project.org Subject: Re: [R] Question about a perceived irregularity

[R] two sample permutation test by sample(..., replacement = T)

2010-07-23 Thread Kay Cichini
hi all, i'm have a small sample (N = 6, n(groups) = 3) and hence the number of possible combinations is small. but if i resample with replacement i have a large number of combinations and get a reasonable result. what are the considerations in this context - resampling with or without

[R] greek letters in rgl plot3d

2010-07-23 Thread james.foadi
Dear RGL experts, I haven't been able to add greek letters to my rgl plot3d. I have tried expression with no success. Here is the interested bit: library(rgl) cb - cube3d() plot3d(cb,xlab=expression(alpha),ylab=,zlab=,box=FALSE,alpha=0.5) The expression(alpha) appears as alpha, rather than

[R] How to get vector of poitions in a vector ?

2010-07-23 Thread vikrant
I have a vector a = c(1,0,0,0,1,0,4,0,0,0) Now I want to get a vector of positions in a vector a where the value is non zero.. How to do it?? -- View this message in context: http://r.789695.n4.nabble.com/How-to-get-vector-of-poitions-in-a-vector-tp227p227.html Sent from the R help

[R] Odp: How to get vector of poitions in a vector ?

2010-07-23 Thread Petr PIKAL
Hi a = c(1,0,0,0,1,0,4,0,0,0) which(a!=0) [1] 1 5 7 Beware of floating point near zero values. Petr r-help-boun...@r-project.org napsal dne 23.07.2010 13:12:44: I have a vector a = c(1,0,0,0,1,0,4,0,0,0) Now I want to get a vector of positions in a vector a where the value is non

[R] model.tables call fails with Error in inherits(object, formula)

2010-07-23 Thread Hannes
Hello, I noticed that model.tables fails when applied to an aov() fit if called inside a function. The problem seems to occur when as.formula is used inside a function on a string containing formula + Error( x / y ) The reason I tried to use as.formula is to generate dynamic calls to aov().

[R] Syntax Highlightning and Editor for Linux

2010-07-23 Thread alaios
Hello to the community . First post :) I would like to ask you which text editor do you use in Linux and how did you setup the syntax highlightning? one more question is it possible to debug any program in R by inserting breakpoints? I would like to thank you in advance for your help Best

Re: [R] Multilevel survival model

2010-07-23 Thread Corey Sparks
check out the coxme and the kinship packages, both have the capability to fit the Cox proportional hazard model in a multi-level setting, or you could use glmer in lme4 to fit discrete-time (logistic) models with random intercepts. CS - Corey Sparks, PhD Assistant Professor Department of

Re: [R] Syntax Highlightning and Editor for Linux

2010-07-23 Thread Duncan Murdoch
On 23/07/2010 8:08 AM, alaios wrote: Hello to the community . First post :) I would like to ask you which text editor do you use in Linux and how did you setup the syntax highlightning? I don't use Linux, but I think the most popular editors there are vim and emacs, the latter with ESS.

Re: [R] Syntax Highlightning and Editor for Linux

2010-07-23 Thread Alaios
I would like to thank you for your immediate reply. Actually I do not like vim and emacs.. I am trying to find an editor with a gui that will work fine in Linux. One more question. If I am editing a file using my external text editor is it possible to execute directly one of the functions that

Re: [R] Syntax Highlightning and Editor for Linux

2010-07-23 Thread stephen sefick
i use gedit. It has nice text highlighting. Stephen Sefick On Fri, Jul 23, 2010 at 7:13 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 23/07/2010 8:08 AM, alaios wrote:  Hello to the community . First post :) I would like to ask you which text editor do you use in Linux and how did

Re: [R] Midpoint between coordinates

2010-07-23 Thread David Winsemius
On Jul 23, 2010, at 7:13 AM, Mafalda Viana wrote: Dear R users, I need to find the coordinates for the point (midpoint) located half way between two pairs of coordinates (lon1,lat1 and lon2,lat2) assuming a straight line between them. What would be the best way? I tried to find an answer in

Re: [R] start and end times to yes/no in certain intervall

2010-07-23 Thread jim holtman
try this: char2hr - function(time){ + mat - do.call(rbind, strsplit(time, :)) + mode(mat) - 'numeric' + mat %*% c(1, 1/60) # convert to hours + } # convert to hours x.hr - apply(x, 2, char2hr) # generate a set of sequences to set values x.seq - apply(x.hr, 1, function(.hr)

Re: [R] How to import simple java/mathematica expression to R

2010-07-23 Thread jim holtman
It would be nice if you could post what the data looks like that you want to import. R can import any text file and then you have string manipulation that you can do to parse it. So the basic answer is probably yes, but we do need to understand the format of the data to give a more precise

Re: [R] Syntax Highlightning and Editor for Linux

2010-07-23 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 23/07/2010 14:17, Alaios wrote: I would like to thank you for your immediate reply. Actually I do not like vim and emacs.. I am trying to find an editor with a gui that will work fine in Linux. Well - you are missing out with not using emacs

[R] sink function

2010-07-23 Thread nuncio m
I have the following code to write the output from auto.arima function. The issue is not in finding the model but to divert its out put fit to a file order_fit.txt. code runs but nothing is written to order_fit.txt where am I going wrong library(forecast) for (i in 1:2) { filen =

Re: [R] model.tables call fails with Error in inherits(object, formula)

2010-07-23 Thread Prof Brian Ripley
The error message actually is Error in inherits(object, formula) : object 'frmlc' not found and it is the omitted-by-you part after the colon that matters: the body of model.tables does not have 'frmlc' in its scope. Here is one approach to using dynamic formulae that works in a lot of

Re: [R] How to get vector of poitions in a vector ?

2010-07-23 Thread Martyn Byng
(1:length(a))[a != 0] -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of vikrant Sent: 23 July 2010 12:13 To: r-help@r-project.org Subject: [R] How to get vector of poitions in a vector ? I have a vector a = c(1,0,0,0,1,0,4,0,0,0)

Re: [R] Question about a perceived irregularity in R syntax

2010-07-23 Thread Duncan Murdoch
On 23/07/2010 7:14 AM, Duncan Murdoch wrote: Nordlund, Dan (DSHS/RDA) wrote: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Peter Dalgaard Sent: Thursday, July 22, 2010 3:13 PM To: Pat Schmitz Cc: r-help@r-project.org

[R] specify heat.colors

2010-07-23 Thread syrvn
Hi, I use heatmap.2 and heat.colors. Is it possible to specify the colors in that way that all values below, for instance, 1.5 should be coloured red, values between 1.5 and 1.7 green and above 1.7 black? Many thanks -- View this message in context:

Re: [R] Midpoint between coordinates

2010-07-23 Thread Mafalda Viana
The arithmetic mean was my first approach and to nearby points it doesn't make much difference. However, when the distance between the 2 points gets bigger this is no longer accurate enough. So yes, I was thinking on spherical geometry, midpoint considering the great circle distance or similar.

Re: [R] Midpoint between coordinates

2010-07-23 Thread David Winsemius
On Jul 23, 2010, at 8:58 AM, Mafalda Viana wrote: The arithmetic mean was my first approach and to nearby points it doesn't make much difference. However, when the distance between the 2 points gets bigger this is no longer accurate enough. So yes, I was thinking on spherical geometry,

Re: [R] start and end times to yes/no in certain intervall

2010-07-23 Thread Allan Engelhardt
I like loops for this kind of thing so here is one: df- structure(list(start = c(15:00, 15:00, 15:00, 11:00, 14:00, 14:00, 15:00, 12:00, 12:00, 12:00, 12:00, 12:00, 12:00, 12:00, 12:00, 12:00, 12:00, 12:00, 12:00, 12:00), end = c(16:00, 16:00, 16:00, 12:00, 16:00, 15:00, 16:00, 13:00, 13:00,

Re: [R] legend in R plot

2010-07-23 Thread li li
Thank you all for your kind reply and help. I changed the legend function as Mr. Peter Ehlers suggested and the plots look good. Thank you again. Hannah 2010/7/22 Peter Ehlers ehl...@ucalgary.ca On 2010-07-21 22:06, li li wrote: Hi all, I am have some difficulty

[R] Figures in Latex

2010-07-23 Thread li li
Hi all, I want to add 6 plots in the format of 2 columns and 3 rows as one figure in latex. The plots are in .eps file. I know how to add 2 plots side by side, but could not figure out how to do multiple rows. I know this may not be the right place to ask such a question. But I do not know

Re: [R] Syntax Highlightning and Editor for Linux

2010-07-23 Thread Federico Andreis
I have been trying emacs with ess, Kate, plain gedit..nothing really satisfied me.. but then I found a nice plugin for gedit: Rgedit ! it supports split screen with R terminal window (you can also personalize colour if, like me, do like to stick with old habits :) ), moreover gedit has a brackets

Re: [R] Figures in Latex

2010-07-23 Thread David Winsemius
On Jul 23, 2010, at 9:43 AM, li li wrote: Hi all, I want to add 6 plots in the format of 2 columns and 3 rows as one figure in latex. The plots are in .eps file. I know how to add 2 plots side by side, but could not figure out how to do multiple rows. I know this may not be the right

Re: [R] Syntax Highlightning and Editor for Linux

2010-07-23 Thread Alaios
I would like oto thank everyone for the replies. I instaled rkward.. It looks like an editor.. Is it possible to execute also your code from the text editor. If there is a function call myfunc inside my file test.R Is it possible to exectute the function from the rwkard? Best Regards Alex

Re: [R] Syntax Highlightning and Editor for Linux

2010-07-23 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 23/07/2010 15:56, Alaios wrote: I would like oto thank everyone for the replies. I instaled rkward.. It looks like an editor.. Is it possible to execute Yes also your code from the text editor. Look into the Run menu If there is a function

Re: [R] Midpoint between coordinates

2010-07-23 Thread Mafalda Viana
Dear David and R users, Thank you very much for the help. There is a function in the suggested package called midPoint which does what I need. df- data.frame(lon1=c(-4.568,-4.3980), lat1=c(59.235,56.369), lon2=c(-5.123,-4.698), lat2=c(60.258,59.197) ) library(geosphere) p1 -

[R] Regex in an IF statement?

2010-07-23 Thread Jim Hargreaves
Dear List I have the POSIX timestamps of two events, A and B respectively. I want an expression that tests if A occurs within 4 weeks of B. Something like: if (ts_A is between ts_B + 4(weeks) and ts_B - 4) ... Can probably done by regex but the regex docu for R says nothing about if

[R] overriding axis limits in hexbin plot?

2010-07-23 Thread Ben Bolker
[cc'd to package maintainer] This feels like a fairly straightforward question, so I'm surprised not to have found an answer so far (RSiteSearch, package help, vignette ...) It seems fairly hard (without some fairly serious hacking) to hard-code the axis limits in a hexbin plot from the

Re: [R] Regex in an IF statement?

2010-07-23 Thread Allan Engelhardt
help(difftime) is probably what you want. If not, please post a standalone example Allan On 23/07/10 15:18, Jim Hargreaves wrote: Dear List I have the POSIX timestamps of two events, A and B respectively. I want an expression that tests if A occurs within 4 weeks of B. Something like: if

[R] recoding problem

2010-07-23 Thread Heiman, Thomas J.
Hi, I am trying to recode the output from a matrix(here is a small snippet of it): HGlt10RawPerc2008[1:20] [1] -5 0 -1 -1 0 2 3 -5 -2 0 2 0 1 -2 3 0 4 1 4 2

[R] FW: recoding problem

2010-07-23 Thread Heiman, Thomas J.
Hi, I am trying to recode the output from a matrix(here is a small snippet of it): HGlt10RawPerc2008[1:20] [1] -5 0 -1 -1 0 2 3 -5 -2 0 2 0 1 -2 3 0 4 1 4 2

Re: [R] FW: recoding problem

2010-07-23 Thread Joshua Wiley
Hi Tom, This seems to work like I'd expect: HGlt10RawPerc2008 - read.table(textConnection( -5 0 -1 -1 0 2 3 -5 -2 0 2 0 1 -2 3 0 4 1 4 2 )) recode(HGlt10RawPerc2008 ,-100:0.0 = 10; 0:1.0 = 8; 1.001:3.0 = 6; 3.001:4.0 = 4; 4.001:5.0 = 2; else = 0) I wonder if your data might not

[R] randomness using runif

2010-07-23 Thread Brigid Mooney
I'm working on a problem where I'm introducing random error and have been using the built in function runif to provide that random error. However, I realized that I seem to be getting some unexpected behavior out of the function and was hoping someone could share some insight. I don't know the

[R] converting a time to nearest half-hour

2010-07-23 Thread Murali.Menon
Hi folks, I've got a POSIXct datum as follows: Sys.time() [1] 2010-07-23 11:29:59 BST I want to convert this to the nearest half-hour, i.e., to 2010-07-23 11:30:00 BST (If the time were 11:59:ss, I want to convert to 12:00:00). How to achieve this? Thanks, Murali

Re: [R] randomness using runif

2010-07-23 Thread Duncan Murdoch
On 23/07/2010 11:16 AM, Brigid Mooney wrote: I'm working on a problem where I'm introducing random error and have been using the built in function runif to provide that random error. However, I realized that I seem to be getting some unexpected behavior out of the function and was hoping

Re: [R] randomness using runif

2010-07-23 Thread David Winsemius
On Jul 23, 2010, at 11:16 AM, Brigid Mooney wrote: I'm working on a problem where I'm introducing random error and have been using the built in function runif to provide that random error. However, I realized that I seem to be getting some unexpected behavior out of the function and was

Re: [R] Correct statistical inference for linear regression modelswithout intercept in R

2010-07-23 Thread Setlhare Lekgatlhamang
In addition, there are 'theoretical' reasons for excluding intercept from the model that must be considered. The reasons related to the regressor(s) and depend on the phenomenon being modelled. For example, whereas the intercept can be excluded in a bivariate model on the expenditure of an

[R] decimal seperator

2010-07-23 Thread Jennifer Sabatier
Hi R-List, I have a question regarding R-language formats, I think. I am producing a series of graphs (using plot, barplot, barchart, and bwplot, using either text or mtext to place values on the graphs) and tables for a Francophone country. In fact, I have already done so. However, while they

Re: [R] converting a time to nearest half-hour

2010-07-23 Thread David Winsemius
On Jul 23, 2010, at 11:20 AM, murali.me...@avivainvestors.com murali.me...@avivainvestors.com wrote: Hi folks, I've got a POSIXct datum as follows: Sys.time() [1] 2010-07-23 11:29:59 BST I want to convert this to the nearest half-hour, i.e., to 2010-07-23 11:30:00 BST (If the time

Re: [R] decimal seperator

2010-07-23 Thread David Winsemius
On Jul 23, 2010, at 11:32 AM, Jennifer Sabatier wrote: Hi R-List, I have a question regarding R-language formats, I think. I am producing a series of graphs (using plot, barplot, barchart, and bwplot, using either text or mtext to place values on the graphs) and tables for a

Re: [R] converting a time to nearest half-hour

2010-07-23 Thread David Winsemius
On Jul 23, 2010, at 11:35 AM, David Winsemius wrote: On Jul 23, 2010, at 11:20 AM, murali.me...@avivainvestors.com murali.me...@avivainvestors.com wrote: Hi folks, I've got a POSIXct datum as follows: Sys.time() [1] 2010-07-23 11:29:59 BST I want to convert this to the nearest

Re: [R] decimal seperator

2010-07-23 Thread Jennifer Sabatier
Worked like a charm! Thanks a lot! Jen On Fri, Jul 23, 2010 at 11:48 AM, Alain Guillet alain.guil...@uclouvain.bewrote: Hi, I am sure there is a better solution but a possibility is that you use sub(\\.,,,as.character(newdata)) instead of newdata in the text calls. HTH, Alain

Re: [R] converting a time to nearest half-hour

2010-07-23 Thread stephen sefick
If you have a zoo series this should work. If it doesn't then please tell me because I think it works. snap2min - function(zoo, min=00:15:00){ min15 - times(min) a - aggregate(zoo, trunc(time(zoo), min15), function(x) mean(x, na.rm=TRUE)) } hth Stephen Sefick On Fri, Jul 23, 2010 at 11:00 AM,

Re: [R] decimal seperator

2010-07-23 Thread Jennifer Sabatier
Wow, that's even better! Thanks to you both. I know both options will come in handy! Jen On Fri, Jul 23, 2010 at 11:58 AM, David Winsemius dwinsem...@comcast.netwrote: On Jul 23, 2010, at 11:32 AM, Jennifer Sabatier wrote: Hi R-List, I have a question regarding R-language formats, I

[R] How to deal with more than 6GB dataset using R?

2010-07-23 Thread babyfoxlove1
nbsp;Hi there, Sorry to bother those who are not interested in this problem. I'm dealing with a large data set, more than 6 GB file, and doing regression test with those data. I was wondering are there any efficient ways to read those data? Instead of just using read.table()? BTW, I'm using a

Re: [R] Syntax Highlightning and Editor for Linux

2010-07-23 Thread schuster
Rkward is great. If you are a programmer then have a look at the StatET plugin for eclipse (Java). Not so simple to set up. On Friday 23 July 2010 02:17:36 pm Alaios wrote: I would like to thank you for your immediate reply. Actually I do not like vim and emacs.. I am trying to find an

Re: [R] converting a time to nearest half-hour

2010-07-23 Thread David Winsemius
On Jul 23, 2010, at 12:04 PM, stephen sefick wrote: If you have a zoo series this should work. If it doesn't then please tell me because I think it works. snap2min - function(zoo, min=00:15:00){ min15 - times(min) a - aggregate(zoo, trunc(time(zoo), min15), function(x) mean(x, na.rm=TRUE))

Re: [R] converting a time to nearest half-hour

2010-07-23 Thread Jeff Newmiller
By entering trunc.POSIXt at the R commandline, you can see the standard truncate implementation. Riffing on this, roundhalfhour - function( x ) { x - as.POSIXlt( x + as.difftime( 15, units=mins ) ) x$sec - 0 x$min - 30*(x$min %/% 30) as.POSIXct(x) } The as.double approach ought to work

Re: [R] converting a time to nearest half-hour

2010-07-23 Thread Jeff Newmiller
This truncates to quarter-hour rather than rounding to half-hour. stephen sefick ssef...@gmail.com wrote: If you have a zoo series this should work. If it doesn't then please tell me because I think it works. snap2min - function(zoo, min=00:15:00){ min15 - times(min) a - aggregate(zoo,

Re: [R] converting a time to nearest half-hour

2010-07-23 Thread Allan Engelhardt
The arithmetic that David describes should work fine (POSIXct is internally in UTC) unless you are in the Chatham Islands (which has a UTC+12:45 time zone [1]) or Nepal (UTC+05:45 [2]) or some such place with a funny idea about when the 1/2 hour mark is. The formatting of the output may be

Re: [R] converting a time to nearest half-hour

2010-07-23 Thread Murali.Menon
David, Stephen, You're right - it's the time zone conventions that threw me as well. I tried those round() operations earlier, but inevitably ended up being either an hour behind. Even when I specified my time zone, it didn't make any difference. So there's something else that I'm missing. I'll

Re: [R] How to deal with more than 6GB dataset using R?

2010-07-23 Thread Duncan Murdoch
On 23/07/2010 12:10 PM, babyfoxlo...@sina.com wrote: nbsp;Hi there, Sorry to bother those who are not interested in this problem. I'm dealing with a large data set, more than 6 GB file, and doing regression test with those data. I was wondering are there any efficient ways to read those

[R] Error produced by read.zoo: bad entries

2010-07-23 Thread Dimitri Liakhovitski
Hello! I have a data set similar to the data set monthly in the example below: monthly-data.frame(month=c(20090301,20090401,20090501,20100301,20100401,20090301,20090401,20090501,20100301,20100401),monthly.value=c(100,200,300,101,201,10,20,30,11,21),market=c(Market A,Market A, Market A,Market A,

Re: [R] How to deal with more than 6GB dataset using R?

2010-07-23 Thread Allan Engelhardt
read.table is not very inefficient IF you specify the colClasses= parameter. scan (with the what= parameter) is probably a little more efficient. In either case, save the data using save() once you have it in the right structure and it will be much more efficient to read it next time. (In

Re: [R] class

2010-07-23 Thread schuster
Hi, Strange, there seems to be different behavior of old style classes and S4 classes. This worked just like you expected (but it's not the same thing, no S4 classes) f2=function(x,...) UseMethod(fxy) fxy.default=function(x,...){ print(default) } fxy.X=function(x,...) {

[R] Tutorial Tinn-R

2010-07-23 Thread suse
Hi, does anyone know a tutorial for Tinn-R? During all my search I only found R-Tutorials... The problem now is: I would like to make Tinn-R an autosave. But since I had several questions before concerning Tinn-R (for example, how to have Tinn-R and R in one window or how do the new versions

Re: [R] How to deal with more than 6GB dataset using R?

2010-07-23 Thread Allan Engelhardt
On 23/07/10 17:36, Duncan Murdoch wrote: On 23/07/2010 12:10 PM, babyfoxlo...@sina.com wrote: [...] You probably won't get much faster than read.table with all of the colClasses specified. It will be a lot slower if you leave that at the default NA setting, because then R needs to figure

Re: [R] converting a time to nearest half-hour

2010-07-23 Thread Gabor Grothendieck
On Fri, Jul 23, 2010 at 12:35 PM, murali.me...@avivainvestors.com wrote: David, Stephen, You're right - it's the time zone conventions that threw me as well. I tried those round() operations earlier, but inevitably ended up being either an hour behind. Even when I specified my time zone, it

Re: [R] Error produced by read.zoo: bad entries

2010-07-23 Thread David Winsemius
?read.zoo You didn't specify the index column correctly. On Jul 23, 2010, at 12:36 PM, Dimitri Liakhovitski wrote: Hello! I have a data set similar to the data set monthly in the example below: monthly- data .frame (month = c

Re: [R] Tutorial Tinn-R

2010-07-23 Thread Bert Gunter
Google on tinn-r tutorial. However, I believe that you will find that the answer is no, there isn't anything useful out there. Moreover, TINN-R's help files are minimal and terrible, even though the package itself is quite useful (I find). Please Do NOT post further TINN-R questions to this list

Re: [R] Error produced by read.zoo: bad entries

2010-07-23 Thread Dimitri Liakhovitski
Strange, I did attach. Attaching again. Maybe the file just doesn't go through? I have: names(OrigData): [1] Brand Month Value I read ?read.zoo According to that index should be the column number. I thought it should be split = 1 in my case - because I am splitting by Brand. But neither split =

[R] re-ordering bwplot

2010-07-23 Thread Eck, Bradley J
Dear list: I'm using bwplot to compare concentrations by location and treatment as in: # using built in data bwplot( conc ~ Type : Treatment, data = CO2 ) I would like the order of the plots to be: 3,4,1,2. I can't seem to figure this out with index.cond or permc.cond. Any help is

Re: [R] Error produced by read.zoo: bad entries

2010-07-23 Thread David Winsemius
But, but, but Did you read my message about the need to correctly specify index columns? The problem is that read.zoo is reading your first column as an index and it's actually the second column that should be used for that purpose. -- David. On Jul 23, 2010, at 1:01 PM, Dimitri

Re: [R] How to import simple java/mathematica expression to R

2010-07-23 Thread Andrey Siver
Hello, 2010/7/23 jim holtman jholt...@gmail.com: It would be nice if you could post what the data looks like that you want to import.  R can import any text file and then you have string manipulation that you can do to parse it.  So the basic answer is probably yes, but we do need to

Re: [R] re-ordering bwplot

2010-07-23 Thread Deepayan Sarkar
On Fri, Jul 23, 2010 at 10:02 AM, Eck, Bradley J brad@mail.utexas.edu wrote: Dear list: I'm using bwplot to compare concentrations by location and treatment as in: # using built in data bwplot( conc ~ Type : Treatment, data = CO2 ) I would like the order of the plots to be: 3,4,1,2.  

Re: [R] Error produced by read.zoo: bad entries

2010-07-23 Thread Dimitri Liakhovitski
Very sorry - I mistunderstood and confused split with index.column - totally my fault. Ok, now I've run this line: z - read.zoo(OrigData, index.column = 2, split = Brand) And I am getting: Error in merge.zoo(` Plus` = c(NA, 98L, 95L, 97L, NA, 98L, 97L, 98L, NA, : series cannot be merged with

Re: [R] Error produced by read.zoo: bad entries

2010-07-23 Thread David Winsemius
On Jul 23, 2010, at 1:39 PM, Dimitri Liakhovitski wrote: Very sorry - I mistunderstood and confused split with index.column - totally my fault. Ok, now I've run this line: z - read.zoo(OrigData, index.column = 2, split = Brand) And I am getting: Error in merge.zoo(` Plus` = c(NA, 98L, 95L,

Re: [R] Error produced by read.zoo: bad entries

2010-07-23 Thread Dimitri Liakhovitski
I am expecting to see the week names as row labels of z and the corresponding values (like in the monthly example). I am pretty sure - in order to get it one needs to install the latest version of zoo. I've done it just a couple of days ago. I am getting the error - and nothing is produced. Can it

Re: [R] Error produced by read.zoo: bad entries

2010-07-23 Thread Gabor Grothendieck
On Fri, Jul 23, 2010 at 1:39 PM, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: Very sorry - I mistunderstood and confused split with index.column - totally my fault. Ok, now I've run this line: z - read.zoo(OrigData, index.column = 2, split = Brand) And I am getting: Error in

[R] Survival analysis MLE gives NA or enormous standard errors

2010-07-23 Thread Christopher David Desjardins
Hi, I am trying to fit the following model: sr.reg.s4.nore - survreg(Surv(age_sym4,sym4), as.factor(lifedxm), data=bip.surv) Where age_sym4 is the age that a subject develops clinical thought problems; sym4 is whether they develop clinical thoughts problems (0 or 1); and lifedxm is

Re: [R] re-ordering bwplot

2010-07-23 Thread Peter Ehlers
On 2010-07-23 11:36, Deepayan Sarkar wrote: On Fri, Jul 23, 2010 at 10:02 AM, Eck, Bradley J brad@mail.utexas.edu wrote: Dear list: I'm using bwplot to compare concentrations by location and treatment as in: # using built in data bwplot( conc ~ Type : Treatment, data = CO2 ) I would

Re: [R] Error produced by read.zoo: bad entries

2010-07-23 Thread David Winsemius
On Jul 23, 2010, at 1:50 PM, Dimitri Liakhovitski wrote: I am expecting to see the week names as row labels of z and the corresponding values (like in the monthly example). I am pretty sure - in order to get it one needs to install the latest version of zoo. I've done it just a couple of days

Re: [R] Error produced by read.zoo: bad entries

2010-07-23 Thread Dimitri Liakhovitski
David/Gabor, you helped me a lot. Gabor - I've run table(OrigData$Month) - and it looked weird. I went back to my file and changed the format of the date (Month) in Excel. I have no idea what it does - but after I saved it again, it worked. Thanks a lot! I'll open another thread where I'll ask

Re: [R] Error produced by read.zoo: bad entries

2010-07-23 Thread Gabor Grothendieck
On Fri, Jul 23, 2010 at 2:07 PM, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: David/Gabor, you helped me a lot. Gabor - I've run table(OrigData$Month) - and it looked weird. I went back to my file and changed the format of the date (Month) in Excel. I have no idea what it does

Re: [R] Figures in Latex

2010-07-23 Thread Saeed Abu Nimeh
http://nixtricks.wordpress.com/2009/11/09/latex-multiple-figures-under-the-same-caption-using-subfigure/ It will create two rows of subfigures with two subfigures on each row On Fri, Jul 23, 2010 at 6:43 AM, li li hannah@gmail.com wrote: Hi all,   I want to add 6 plots in the format of 2

Re: [R] Survival analysis MLE gives NA or enormous standard errors

2010-07-23 Thread Charles C. Berry
On Fri, 23 Jul 2010, Christopher David Desjardins wrote: Hi, I am trying to fit the following model: sr.reg.s4.nore - survreg(Surv(age_sym4,sym4), as.factor(lifedxm), data=bip.surv) Next time include a reproducible example. i.e. something we can run. Now, Google Hauck Donner Effect to

Re: [R] Tutorial Tinn-R

2010-07-23 Thread Kingsford Jones
I found the user guide available at Help Main User Guide Html to be quite useful for getting started. I don't think this was available when first I looked at Tinn-R a couple years ago, at which point I too felt the help files were very poor. But under 2.3.5.2 the file is there, and Tinn-R is

Re: [R] Survival analysis MLE gives NA or enormous standard errors

2010-07-23 Thread Christopher David Desjardins
Sorry. I should have included some data. I've attached a subset of my data (50/192) cases in a Rdata file and have pasted it below. Running anova I get the following: anova(sr.reg.s4.nore) Df Deviance Resid. Df-2*LL P(|Chi|) NULL NA NA45

Re: [R] Figures in Latex

2010-07-23 Thread Kingsford Jones
to make the desired within R's plotting device rather than in latex try: par(mfrow = c(3, 2)) and you'll probably want to adjust other mar, parameters as well (e.g. mar, cex.lab, etc). Or, take advantage of the flexibility offered by the graphics package by studying ?layout hth, Kingsford

[R] sparsity

2010-07-23 Thread Nathalie Gimenes
Hi All, I would like to estimate the sparsity function using Hall Sheater bandwidth. Is there any command for this? Thanks, NGS [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Figures in Latex

2010-07-23 Thread Felipe Carrillo
Hannah: I am not sure if this is what you need but you can use an array to do that. Copy and paste the below code to your latex code. \newpage \begin{landscape} \begin{figure}[h] \begin{center}$ \begin{array}{cc} \includegraphics[width=2in]{yourgraphicname}

Re: [R] sparsity

2010-07-23 Thread Allan Engelhardt
The functions {summary,bandwidth}.rq() in the package quantreg looks promising, but it is not really my area... http://lmgtfy.com/?q=Hall-Sheater+sparsity+%22r-project%22 Hope this helps a little. Allan On 23/07/10 21:02, Nathalie Gimenes wrote: Hi All, I would like to estimate the

Re: [R] Survival analysis MLE gives NA or enormous standard errors

2010-07-23 Thread Charles C. Berry
On Fri, 23 Jul 2010, Christopher David Desjardins wrote: Sorry. I should have included some data. I've attached a subset of my data (50/192) cases in a Rdata file and have pasted it below. Running anova I get the following: anova(sr.reg.s4.nore) Df Deviance Resid. Df

Re: [R] re-ordering bwplot

2010-07-23 Thread Steven McKinney
Here's one way - you can reorder the levels of a factor variable by specifying the levels the way you want them. require(lattice) Loading required package: lattice bwplot( conc ~ Type : Treatment, data = CO2 ) str(CO2$Type) Factor w/ 2 levels Quebec,Mississippi: 1 1 1 1 1 1 1 1 1 1 ...

[R] Convert Row Names to data.frame column

2010-07-23 Thread chipmaney
Here is an example dataset: ZoneCover.df- data.frame(Value=c(1,2)) row.names(ZoneCover.df) - c(Floodplain1.Tree, Floodplain1.Shrub) I want to Export the Row.Names to a column in the dataframe: ZoneCover.df$ID - names(ZoneCover.df) which yields this: ZoneCover.df Value

Re: [R] Convert Row Names to data.frame column

2010-07-23 Thread David Winsemius
On Jul 23, 2010, at 6:18 PM, chipmaney wrote: Here is an example dataset: ZoneCover.df- data.frame(Value=c(1,2)) row.names(ZoneCover.df) - c(Floodplain1.Tree, Floodplain1.Shrub) I want to Export the Row.Names to a column in the dataframe: ZoneCover.df$ID - names(ZoneCover.df) which

  1   2   >