[R] sqrt(-x) vs. -x^0.5

2012-03-21 Thread Mike Williamson
Hi Everyone, I did a search through the archives and did not find an answer, although I must admit it is a hard search to do ( ^0.5 is tough to explicitly search for ). I am sure there is some mathematically accurate reason to explain the following, but I guess I either never learned it

Re: [R] sqrt(-x) vs. -x^0.5

2012-03-21 Thread Mike Williamson
Thanks Sarah, All, I guess I never thought of a negative sign as an operation, but knowing that it is considered an operation explains everything nicely. Somewhere in it's underbelly, I suppose -4 is represented as 0 - 4? Either way, I'm glad it is consistent accurate, so that I didn't

[R] any updates w.r.t. lapply, sapply, apply retaining classes

2011-11-03 Thread Mike Williamson
Hi All, I don't have a I need help question, so much as a query into any update whether 'R' has made any progress with some of the core functions retaining classes. As an example, because it's one of the cases that most egregiously impacts me my work and keeps pushing me away from 'R' and

Re: [R] any updates w.r.t. lapply, sapply, apply retaining classes

2011-11-03 Thread Mike Williamson
AM, Mike Williamson this.is@gmail.com wrote: Hi All, I don't have a I need help question, so much as a query into any update whether 'R' has made any progress with some of the core functions retaining classes. As an example, because it's one of the cases that most egregiously

Re: [R] any way to convert back to DateTime class when accidental conversion to numeric?

2011-10-06 Thread Mike Williamson
: Here is what I use: unix2POSIXct(1317857320) [1] 2011-10-05 19:28:40 EDT unix2POSIXct - function (time) structure(time, class = c(POSIXt, POSIXct)) On Wed, Oct 5, 2011 at 7:38 PM, Mike Williamson this.is@gmail.com wrote: Hi, In short, I would like to know if there is any way

[R] any way to convert back to DateTime class when accidental conversion to numeric?

2011-10-05 Thread Mike Williamson
Hi, In short, I would like to know if there is any way to convert a numeric into a date, similar to how strptime() can convert a string to a date time class? There are some functions, etc. which don't work well with dates, and tend to force them into numerics. I understand that the

Re: [R] S4 classes, some help with the basics

2011-08-09 Thread Mike Williamson
Thanks Duncan, Martin, You both provided exactly what I needed! Regards, Mike --- XKCD http://www.xkcd.com On Mon, Aug 8, 2011 at 5:21 PM, Duncan Murdoch murdoch.dun...@gmail.comwrote: On 08/08/2011 8:04 PM, Mike Williamson wrote: Hi

[R] S4 classes, some help with the basics

2011-08-08 Thread Mike Williamson
Hi All, I have tried to find an answer within documentation, but I cannot: o How can call a class slot without knowing the name a priori? E.g., let's say I use the pcaMethods library to create a pcaRes object. How can I call parts of that object without using the specific names of the

[R] manipulating the Date Time classes

2011-02-08 Thread Mike Williamson
Hello, This is mostly to developers, but in case I missed something in my literature search, I am sending this to the broader audience. - Are there any plans in the works to make time classes a bit more friendly to the rest of the R world? I am not suggesting to allow for fancy

Re: [R] manipulating the Date Time classes

2011-02-08 Thread Mike Williamson
spec...@stat.berkeley.edu On Tue, 8 Feb 2011, Mike Williamson wrote: Hello, This is mostly to developers, but in case I missed something in my literature search, I am sending this to the broader audience. - Are there any plans in the works to make time classes a bit more

[R] syntax for extending a line in a script??

2011-01-12 Thread Mike Williamson
Hello, A hopefully simple question. I use 'R' through emacs, but I suspect the following would occur with any manner of text editor: - my editor has a normally quite handy feature where it will automatically indent to the appropriate level when I start a new line. However, this

Re: [R] syntax for extending a line in a script??

2011-01-12 Thread Mike Williamson
already here. -- xkcd -- Help protect Wikipedia. Donate now: http://wikimediafoundation.org/wiki/Support_Wikipedia/en On Wed, Jan 12, 2011 at 6:08 PM, Brian Diggs dig...@ohsu.edu wrote: On 1/12/2011 2:46 PM, Mike Williamson wrote: Hello, A hopefully simple question. I use 'R' through

[R] ideas, modeling highly discrete time-series data

2010-12-20 Thread Mike Williamson
Hello all, First of all, thanks so those of you who helped me a week or so ago managing a time series with varying gaps between the data series in 'R'. (My final preferred solution was to use its function then forecast(Arima( ) ). ) My next question is a general statistical question

[R] how to convert sloppy data into a time series?

2010-12-16 Thread Mike Williamson
Hi All, First let me state that I did search for a while on r-help, google, and using the sos package inside of 'R', without much luck. I want to know how to create a univariate time series from a set of data that will have huge time gaps in it. For instance, here is a snapshot of a piece

Re: [R] How to get 'R' to talk BACK to other languages / scripts??

2010-12-06 Thread Mike Williamson
testing.R.r) echo myTest contains echo $myTest Note that testing.R.r will have to cat() or print() myResult (e.g, my testing.R.r contains myResult - paste(Hello World) cat(myResult) Best, Ista On Fri, Dec 3, 2010 at 1:23 PM, Mike Williamson this.is@gmail.com wrote: Hey everyone

[R] How to get 'R' to talk BACK to other languages / scripts??

2010-12-03 Thread Mike Williamson
Hey everyone, I know that I can call 'R' from other scripts, and that I can make command calls from 'R' (e.g., using system() ). But how can I get 'R' to RETURN values to the script that called it. E.g., I would like to be able to do something like the following (as a simpler example) from

Re: [R] trouble with RODBC -- chopping off part of column names

2010-10-04 Thread Mike Williamson
AM, Marc Schwartz marc_schwa...@me.com wrote: On Oct 1, 2010, at 6:26 PM, Mike Williamson wrote: Hello all, I have a strange / interesting problem that might be 'R' settings themselves, or it might be something with the OS. I am using the RODBC library. I have a script that goes

[R] trouble with RODBC -- chopping off part of column names

2010-10-01 Thread Mike Williamson
Hello all, I have a strange / interesting problem that might be 'R' settings themselves, or it might be something with the OS. I am using the RODBC library. I have a script that goes out and, before making a query for a big data set, will first query for the column names of the data

[R] odd behavior of summary function

2010-08-24 Thread Mike Williamson
Hello All, Using the standard summary function in 'R', I ran across some odd behavior that I cannot understand. Easy to reproduce: Typing: summary(c(6,207936)) Yields:: Min. *1st Qu. MedianMean 3rd Qu.Max.* 6 *51990 104000 104000 156000 207900* None of

[R] some helpful tips on using RODBC

2010-08-13 Thread Mike Williamson
Hey everyone, I don't have a question. Instead some helpful advice with things I've learned from trying to connect 'R' to databases using RODBC. ROBDC is a very handy tool that, once you have everything fixed up nicely, is a great way to have scripts run fairly autonomously, safe in

[R] ggplot2 histograms... a subtle error found

2010-07-28 Thread Mike Williamson
Hello all, I have a peculiar and particular bug that I stumbled across with ggplot2. I cannot seem to replicate it with anything other than my specific data set. Here is the problem: - when I try to plot a histogram, allowing for ggplot2 to decide the binwidths itself, I get the

[R] question regarding varImpPlot results vs. model$importance data on package RandomForest

2010-07-13 Thread Mike Williamson
Hi everyone, I have another Random Forest package question: - my (presumably incorrect) understanding of the varImpPlot is that it should plot the % increase in MSE and IncNodePurity exactly as can be found from the importance section of the model results. - However, the plot

Re: [R] anyone know why package RandomForest na.roughfix is so slow??

2010-07-01 Thread Mike Williamson
] On Behalf Of Mike Williamson Sent: Wednesday, June 30, 2010 7:53 PM To: r-help Subject: [R] anyone know why package RandomForest na.roughfix is so slow?? Hi all, I am using the package random forest for random forest predictions. I like the package. However, I have fairly large data

Re: [R] anyone know why package RandomForest na.roughfix is so slow??

2010-07-01 Thread Mike Williamson
4.5-35, Windows XP (32-bit), Thinkpad T61 with 2GB ram. Andy -- *From:* Mike Williamson [mailto:this.is@gmail.com] *Sent:* Thursday, July 01, 2010 12:48 PM *To:* Liaw, Andy *Cc:* r-help *Subject:* Re: [R] anyone know why package RandomForest na.roughfix

Re: [R] anyone know why package RandomForest na.roughfix is so slow??

2010-07-01 Thread Mike Williamson
{ stop(na.roughfix only works for numeric or factor) } x } I'm cheating a bit because as.data.frame is so slow. Hadley On Thu, Jul 1, 2010 at 6:44 PM, Mike Williamson this.is@gmail.com wrote: Jim, Andy, Thanks for your suggestions! I found some time today to futz

[R] anyone know why package RandomForest na.roughfix is so slow??

2010-06-30 Thread Mike Williamson
Hi all, I am using the package random forest for random forest predictions. I like the package. However, I have fairly large data sets, and it can often take *hours* just to go through the na.roughfix call, which simply goes through and cleans up any NA values to either the median

[R] how can I evaluate a formula passed as a string?

2010-06-24 Thread Mike Williamson
Hey everyone, I've been using 'R' long enough that I should have some idea of what the heck either expression() or eval() are really ever useful for. I come across another instance where I WISH they would be useful, but I cannot get them to work. Here is the crux of what I would

Re: [R] how can I evaluate a formula passed as a string?

2010-06-24 Thread Mike Williamson
what's already here. -- xkcd -- Help protect Wikipedia. Donate now: http://wikimediafoundation.org/wiki/Support_Wikipedia/en On Thu, Jun 24, 2010 at 10:29 AM, Peter Langfelder peter.langfel...@gmail.com wrote: On Thu, Jun 24, 2010 at 10:16 AM, Mike Williamson this.is@gmail.com wrote

[R] trouble with Vista reading files

2009-08-20 Thread Mike Williamson
All, I am having trouble with a read.table() function that is inside of another function. But if I call the function by itself, it works fine. Moreover, if I run the script on a Mac OS X (with the default Mac OS X version of R installed, rev 2.8), it works fine. But it does not work if I

[R] How to get legend outside of plot?

2009-01-13 Thread Mike Williamson
I am creating a CDF plot function more user-friendly than any default r function. Depending upon the bimodality of the data (it is often bimodal), or any other strange data trends, the points can end up gathering in just about any corner of the plot. So, when I add a legend, whether I choose

Re: [R] How to capture multiple graph pages to .png ?

2009-01-05 Thread Mike Williamson
...@imail.org 801.408.8111 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Mike Williamson Sent: Saturday, January 03, 2009 9:46 AM To: jim holtman Cc: r-help@r-project.org Subject: Re: [R] How to capture multiple graph pages

[R] How to capture multiple graph pages to .png ?

2009-01-03 Thread Mike Williamson
Hello all and thanks in advance for any help, There are really two issues that I am having, both related to saving graphs: 1) It seems that the dev...() functions are unstable when using higher level graphs (specifically I was using levelplot) 2) I have a large grid of levelplot graphs that

Re: [R] How to capture multiple graph pages to .png ?

2009-01-03 Thread Mike Williamson
, Mike On Sat, Jan 3, 2009 at 8:36 AM, jim holtman jholt...@gmail.com wrote: W.R.T. multiple pages, the HELP page says to use a filename like this: png(filename = Rplot%03d.png, where %03d is an incremented value for each page. On Fri, Jan 2, 2009 at 2:23 PM, Mike Williamson

Re: [R] How to make a smooth ( linear ) CDF plot? -- Thanks!

2008-12-18 Thread Mike Williamson
at 9:48 PM, Mike Williamson this.is@gmail.comwrote: I want to make some simple CDF (cumulative distribution function) plots to check whether distributions are Gaussian / normal. qqnorm() As long as I am asking: I also want to plot more than one distribution or group. For instance

[R] How to make a smooth ( linear ) CDF plot?

2008-12-15 Thread Mike Williamson
, where each factor has it's own cdf line. Any ideas for this? THanks in advance! Mike Williamson [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch

[R] What editors can I get R in Mac OS X to talk to?

2008-10-23 Thread Mike Williamson
All, Apologies if this was already answered... I couldn't find an answer that specifically addressed Mac OS instead of either windows or linux. I use aquamacs emacs as my text editor. It is essentially Xemacs with a GUI that looks closer to standard Mac GUIs, as far as I can tell. I