[R] Best Mac for R

2015-02-25 Thread Dan Murphy
I am possibly in the market for a new laptop. Predominantly a Windows user, I owned a macbook pro 10 years ago and am considering going that route again. Does the standard advice still hold: Get the most powerful processor (i7), most ram (16GB), and largest internal storage (512GB), if affordable?

Re: [R] Best Mac for R

2015-02-25 Thread Dan Murphy
:50 PM, Dan Murphy chiefmur...@gmail.com wrote: I am possibly in the market for a new laptop. Predominantly a Windows user, I owned a macbook pro 10 years ago and am considering going that route again. Does the standard advice still hold: Get the most powerful processor (i7), most ram (16GB

Re: [R] pasteFromExcel

2014-10-21 Thread Dan Murphy
, but I haven't discovered it yet. :( Again, thanks for your help. -Dan On Mon, Oct 20, 2014 at 3:39 PM, David Winsemius dwinsem...@comcast.net wrote: On Oct 20, 2014, at 2:34 PM, Dan Murphy wrote: Good ideas, David. 1) By confirm that MS Excel honors that OutDec I mean that, in a location

[R] pasteFromExcel

2014-10-20 Thread Dan Murphy
To Users of Excel: Following advice from Brian and Markus, I created an RMarkdown vignette that shows an example of how the pasteFromExcel function in the excelRio package on github could be used by an actuary to transfer a triangle from Excel to R. See today's post at

Re: [R] pasteFromExcel

2014-10-20 Thread Dan Murphy
Winsemius dwinsem...@comcast.net wrote: On Oct 19, 2014, at 11:18 PM, Dan Murphy wrote: To Users of Excel: Following advice from Brian and Markus, I created an RMarkdown vignette that shows an example of how the pasteFromExcel function in the excelRio package on github could be used

Re: [R] pasteFromExcel

2014-10-20 Thread Dan Murphy
20, 2014 at 10:56 AM, David Winsemius dwinsem...@comcast.net wrote: On Oct 20, 2014, at 10:29 AM, Dan Murphy wrote: Nice. So if someone were to offer a currency regular expression that works in their locale, I should also ask them to give me the results of Sys.getlocale(LC_MONETARY

[R] Must array methods be defined for user defined classes?

2014-06-30 Thread Dan Murphy
for arithmetic on user defined classes? Maybe the answer has to do with the error message I did not understand. Thanks, Dan Murphy sessionInfo() R version 3.1.0 (2014-04-10) Platform: x86_64-w64-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252

Re: [R] Base within reverses column order

2014-04-05 Thread Dan Murphy
to capture the names of new objects created within? On Fri, Apr 4, 2014 at 10:55 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 04/04/2014 1:32 PM, Dan Murphy wrote: I just noticed this annoyance, but I'm not the first one, apparently -- see http://lists.r-forge.r-project.org/pipermail

[R] Base within reverses column order

2014-04-04 Thread Dan Murphy
I just noticed this annoyance, but I'm not the first one, apparently -- see http://lists.r-forge.r-project.org/pipermail/datatable-help/2012-May/001176.html The thread never answered the OP's question Is this a bug? so I assume the answer, unfortunately, is No. If not a bug, do users of within

Re: [R] plyr: colvar value corresponding to max Date

2014-02-15 Thread Dan Murphy
smartpink...@yahoo.com wrote: Hi, Try ?which.max() # unique values for the combination. ddply(data,.(state),summarize,max_date=value[which.max(date)])[,2] #or ddply(data,.(state),summarize,max_date=value[date == max(date)])[,2] A.K. On Thursday, February 13, 2014 11:15 AM, Dan Murphy

[R] plyr: colvar value corresponding to max Date

2014-02-13 Thread Dan Murphy
I can do this in multiple steps with summarise, joins, etc., but can't help thinking it can be accomplished in one plyr call. Here's a small example: require(plyr) require(lubridate) data - data.frame( + date = rep(as.Date(ymd(20140101 + (0:3) * 100)), 2), + state = rep(c(A, B), each =

[R] meaning of lubridate setdiff

2014-02-09 Thread Dan Murphy
In the lubridate vignette (http://cran.r-project.org/web/packages/lubridate/vignettes/lubridate.html) setdiff(auckland, jsm) results in ## [1] 2011-06-04 12:00:00 NZST--2011-07-20 NZST But if Hadley's mentor had been called away earlier, say, July 31st, wouldn't the set difference have

[R] Packages Depending on my package

2014-02-06 Thread Dan Murphy
Is there a way to determine which, if any, CRAN packages depend on my CRAN package, mondate? Thanks, Dan Murphy [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] Splitting a string expression into components

2013-07-03 Thread Dan Murphy
I have a vector of strings that contain mathematical expressions. E.g., x - c(5 = 7, z = 1+2) and I would like to decompose each expression into its left- and right-hand-side components etc., output something like 5 = 7 z = 1 + 2 Is there something built into the R language to accomplish this?

[R] do.call environment misunderstanding

2013-06-25 Thread Dan Murphy
- function() x^2 do.call(f, list(), envir = e) Error in (function () : object 'x' not found Thanks in advance for clarifying my misunderstanding. Dan Murphy __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] do.call environment misunderstanding

2013-06-25 Thread Dan Murphy
9:32 AM, Dan Murphy wrote: I am having difficulty understanding the envir argument of do.call. The help page says envir an environment within which to evaluate the call. so I thought that in the following toy example x would be found in the environment e and f would return 4 via do.call

Re: [R] do.call environment misunderstanding

2013-06-25 Thread Dan Murphy
: On 25/06/2013 11:56 AM, Dan Murphy wrote: So the trick is to put the function f into e and define its environment to be e: Putting f into e, and defining the environment of f to be e solve different problems. Your toy example has both problems so it's a reasonable solution there, but most real

[R] Calculation with date

2013-03-11 Thread Dan Murphy
The lubridate and seq solutions work because they rely on your specification that the returned date be the first day of the desired subsequent months. Without that requirement they would not always work. For example, if you wanted to add Vec months to the last day of March rather than the first

[R] (no subject)

2012-11-01 Thread Dan Murphy
, POSIX objects and mondate's. Here's your example with that package: library(mondate) d1 - mondate(2011-05-01 CEST) d1 - 1 # subtract one month mondate: timeunits=months [1] 2011-04-01 Regards, Dan Murphy *Message: 1 *Date: Tue, 30 Oct 2012 11:25:39 +0100 *From: paladini palad...@beuth