[R] Excel date to R format

2010-04-12 Thread ManInMoon
I have searched and tried to read before posting but can find nothing to accomplish change Excel dates in double format to R Can someone please help I have a vector of double like this from Excel. 39965.0004549653 and I want to put them in R such that I can display them in any Date and Time

Re: [R] Excel date to R format

2010-04-12 Thread ManInMoon
I mean I want to convert them to whatever is the standard R DateTime class. -- View this message in context: http://n4.nabble.com/Excel-date-to-R-format-tp1837208p1837280.html Sent from the R help mailing list archive at Nabble.com. __

[R] Halting execution in Rcmdr

2010-04-08 Thread ManInMoon
Hi, Does anyone know how to halt Rcmdr? If I make an error and execution is taking a very long time. Is there a way to halt it WITHOUT killing Rcmdr or Rconsole? -- View this message in context: http://n4.nabble.com/Halting-execution-in-Rcmdr-tp1773753p1773753.html Sent from the R help

Re: [R] GUI /IDE

2010-04-01 Thread ManInMoon
Thanks Philippe, I will look at sciviews - I have never used it before. I use Rcmdr, and I find I am often selecting and running the same lines of code. I just thought if we could name them then easily call that region it would be useful. Cheers -- View this message in context:

[R] GUI /IDE

2010-03-30 Thread ManInMoon
Does anyone know of a gui for R that has regions i.e areas of code in a script that can be named and hopefully run as a section? @region Init library(whatever) myprint-function(...){print(...)} @endregion -- View this message in context: http://n4.nabble.com/GUI-IDE-tp1745858p1745858.html

Re: [R] R Cmdr memory

2010-03-28 Thread ManInMoon
Is there a 64 bit R - and where can I get hold of it for Windows please? Your sizes function is useful thanks - but is there some R parameter to allow maximum usage of memory? -- View this message in context: http://n4.nabble.com/R-Cmdr-memory-tp1693483p1693978.html Sent from the R help

[R] R Cmdr memory

2010-03-27 Thread ManInMoon
Hi, I keep getting this error in console. but I have 30G of RAM: Error: cannot allocate vector of size 154.3 Mb Is there some way to tell it I have more memory available? I am on Windows XP 64 bit -- View this message in context: http://n4.nabble.com/R-Cmdr-memory-tp1693483p1693483.html

Re: [R] Calling R functions into C# or C++

2010-03-23 Thread ManInMoon
Fayssal, This zip file appears to be corrupted - do you have another version? -- View this message in context: http://n4.nabble.com/Calling-R-functions-into-C-or-C-tp904267p1679002.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Date conversion issue

2010-03-18 Thread ManInMoon
Thanks - that works -- View this message in context: http://n4.nabble.com/Date-conversion-issue-tp1596548p1597627.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] unbind matrix?

2010-03-18 Thread ManInMoon
I have a function that take a variable number of arguments, each of which must be a vector. Is there a way to unbind a matrix that would pass the columns as vectors? Myfunc-function(...) { [My code] } Myfunc(z[,1],z[,2]) works but Myfunc(z[,1:2]) is passing a submatrix Is there something

Re: [R] unbind matrix?

2010-03-18 Thread ManInMoon
I am trying to un-c... -- View this message in context: http://n4.nabble.com/unbind-matrix-tp1597887p1597987.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] cumsum for matrix

2010-03-18 Thread ManInMoon
IIs there an equivalent of cumsum for a matrix? i.e cumsum is applied to each column ? -- View this message in context: http://n4.nabble.com/cumsum-for-matrix-tp1597985p1597985.html Sent from the R help mailing list archive at Nabble.com. __

[R] how to return date part of POSIXct

2010-03-18 Thread ManInMoon
How do I get a number representing a date from a POSIXct i.e. removing the time elements? -- View this message in context: http://n4.nabble.com/how-to-return-date-part-of-POSIXct-tp1598109p1598109.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] unbind matrix?

2010-03-18 Thread ManInMoon
Sorry David, Here's cut down version of my function - real version does some fancy plot formatting. I have found a way round my problem because cbind will bind vectors and matrices into a single matrix, which I can work with. It is not the answer I was looking for - but it does the job. Many

Re: [R] how to return date part of POSIXct

2010-03-18 Thread ManInMoon
You are right David - I found the as.Date by myself eventually(must be getting better at this!) But unclass is new to me - thanks very much -- View this message in context: http://n4.nabble.com/how-to-return-date-part-of-POSIXct-tp1598109p1598250.html Sent from the R help mailing list archive

[R] Date conversion issue

2010-03-17 Thread ManInMoon
I am parsing dates as follows: z[1:10,1:3] V1 V2 V3 10 03/02/09 22:20:51.274 2 100 03/02/09 22:28:18.801 3 200 03/02/09 22:33:33.762 4 300 03/02/09 22:40:21.826 5 400 03/02/09 22:41:38.361 6 500 03/02/09 22:42:50.882 7 600 03/02/09 22:45:19.885 8 700 03/02/09

Re: [R] Date conversion issue

2010-03-17 Thread ManInMoon
Sorry -- View this message in context: http://n4.nabble.com/Date-conversion-issue-tp1596548p1596880.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] Variable arguments to function

2010-03-12 Thread ManInMoon
But it doesn't say much - is there comprehensive documentation anywhere else? -- View this message in context: http://n4.nabble.com/Variable-arguments-to-function-tp1587907p1590402.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] tm[,-1]

2010-03-12 Thread ManInMoon
Thanks for all the replies guys - I think I get it now! -- View this message in context: http://n4.nabble.com/tm-1-tp1588804p1590282.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] Help on getting help from manuals

2010-03-12 Thread ManInMoon
Hi, A number of people have suggested I read the manuals... Could someone help me by telling me where the primary start point is please? For example, I am interested in writing functions with variable number of arguments - where should I start to look? An introduction to R only show a brief

Re: [R] Variable number of arguments to function

2010-03-12 Thread ManInMoon
Brian, You say See cbind etc. How would I do that? -- View this message in context: http://n4.nabble.com/Variable-number-of-arguments-to-function-tp800843p1590399.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] colname of ... arguments

2010-03-11 Thread ManInMoon
niceplot(e) e On Mar 10, 2010, at 5:21 PM, ManInMoon wrote: I have writtn a function where I pass a variable number of arguments. I They are vectors and I can manipulate them, but I need to get hold of the name for a legend. niceplot-function(...) { parms=list(...) for (x

Re: [R] colname of ... arguments

2010-03-11 Thread ManInMoon
) GreenEyes I will use the vector for plotting too, but I need it's name to produce a legend automatically On 10 March 2010 23:32, David Scott-6 [via R] ml-node+1588213-620034400-180...@n4.nabble.comml-node%2b1588213-620034400-180...@n4.nabble.com wrote: ManInMoon wrote: I have writtn

[R] Group by

2010-03-11 Thread ManInMoon
I have a matrix with a POSIXct as a numeric in the first column. I would like to create a new matrix that is grouped by my chosed time bars. i.e. So I would like to group by hour or day or 5 days, and have all my columns be summed or averaged or counted.. mydata: V1,V2,V3 10:03:13,3.4,1002

Re: [R] colname of ... arguments

2010-03-11 Thread ManInMoon
Duncan, Thanks you - your deparse(substitute(...)) work - fantastic. But, when I pass in multiple arguments: f(z[,1],z[,2]) I only show first argument, rest shows up as NULL -- View this message in context: http://n4.nabble.com/colname-of-arguments-tp1588146p1588872.html Sent from the R help

Re: [R] Group by

2010-03-11 Thread ManInMoon
Thank you In the aggregate how does it know which column to group? I know you give it tDates as the second argument, but it doesn't know that is from DF - we could have put anything there I think... -- View this message in context: http://n4.nabble.com/Group-by-tp1588694p1589005.html Sent

[R] tm[,-1]

2010-03-11 Thread ManInMoon
This does what I was hoping it would: aggregate(tm[,-1],by=list(tm[,10]),FUN=mean) but I don't know what tm[,-1] means (well - the -1 bit anyway. Does it somehow means the whole matrix? Please don't tell me to check the manual - I tried and failed dismally... -- View this message in

Re: [R] Group by

2010-03-11 Thread ManInMoon
My point is this: if we do temp-tDates aggregate(DF[,c('V2', 'V3')], list(format(temp, %H:%M:00)), FUN = sum) Does agrregate still know it's refering to DF$V1 - and if so- how? -- View this message in context: http://n4.nabble.com/Group-by-tp1588694p1589600.html Sent

Re: [R] colname of ... arguments

2010-03-11 Thread ManInMoon
Thanks Duncan - that works perfectly. -- View this message in context: http://n4.nabble.com/colname-of-arguments-tp1588146p1589687.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] Importing Time Series Data for an R Beginner

2010-03-11 Thread ManInMoon
z-read.table(C:/yourfile.txt,header=TRUE,as.is=TRUE); zdates-as.POSIXct(strptime(paste(z[,2],z[,3]), %m/%d/%Y %H:%M:%S),origin=1970-01-01 ); I would then convert z from a dataframe to a numeric matrix, and put zdates in there as numeric too. zm-cbind(z[,1],as.numeric(zdates),z[,4]) I am a

Re: [R] Deltas or changes

2010-03-10 Thread ManInMoon
Hi, I am new to R. What does a negative amount in an index do? i.e. x[-lenght[x]] -- View this message in context: http://n4.nabble.com/Deltas-or-changes-tp1585960p1587408.html Sent from the R help mailing list archive at Nabble.com. __

[R] Variable arguments to function

2010-03-10 Thread ManInMoon
I understand you can pass a variable number of arguments to a function that is written to accept ... I have searched for any documentation on how to write such a function - could someone tell me where to look please -- View this message in context:

Re: [R] Deltas or changes

2010-03-10 Thread ManInMoon
It does help much. Just one line about x[-1] Is there more comprehensive help anywhere? -- View this message in context: http://n4.nabble.com/Deltas-or-changes-tp1585960p1587939.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Deltas or changes

2010-03-10 Thread ManInMoon
Because I am asking for help... On 10 March 2010 20:19, Kevin E. Thorpe [via R] ml-node+1587986-1699461774-180...@n4.nabble.comml-node%2b1587986-1699461774-180...@n4.nabble.com wrote: ManInMoon wrote: Hi, I am new to R. What does a negative amount in an index do? i.e. x[-lenght[x

Re: [R] Deltas or changes

2010-03-10 Thread ManInMoon
Thank you! On 10 March 2010 21:21, David Winsemius [via R] ml-node+1588077-2145101402-180...@n4.nabble.comml-node%2b1588077-2145101402-180...@n4.nabble.com wrote: On Mar 10, 2010, at 2:50 PM, ManInMoon wrote: It does help much. Just one line about x[-1] Is there more

Re: [R] Numeric to Date

2010-03-10 Thread ManInMoon
numToPOSIXct - function(v) { now - Sys.time() Epoch - now - as.numeric(now) Epoch + v } Try this - where v is your numeric version of date -- View this message in context: http://n4.nabble.com/Numeric-to-Date-tp1588108p1588149.html Sent from the R help mailing list archive at

[R] colname of ... arguments

2010-03-10 Thread ManInMoon
I have writtn a function where I pass a variable number of arguments. I They are vectors and I can manipulate them, but I need to get hold of the name for a legend. niceplot-function(...) { parms=list(...) for (x in parms) { DoSomethingWith(x) } } BUT how how can I get something

[R] Deltas or changes

2010-03-09 Thread ManInMoon
How can I generate a vector of differences between each elemtn of an vector? i.e. a[i]=x[i]/x[i-1] -- View this message in context: http://n4.nabble.com/Deltas-or-changes-tp1585960p1585960.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] asdate parsing

2010-03-08 Thread ManInMoon
Thanks Gabor - sprintf did the trick -- View this message in context: http://n4.nabble.com/as-date-parsing-tp1582868p1584218.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] POSIXct type lost

2010-03-08 Thread ManInMoon
It appears that I am creating a matrix where als columns are of type number, so my Date column has been converted to a number. Is there a way to show or display this number column as a Date again? -- View this message in context: http://n4.nabble.com/POSIXct-type-lost-tp1584379p1584410.html

[R] POSIXct type lost

2010-03-08 Thread ManInMoon
I am generating a column of dates using POSIXct, but when I try to assign it to an existing dataframe - it gets stored as numbers instead of as POSIXct. Is there a way to force a column to be a specific type (POSIXct)? Thanks, Moon -- View this message in context:

Re: [R] POSIXct type lost

2010-03-08 Thread ManInMoon
What is R News 4/1? -- View this message in context: http://n4.nabble.com/POSIXct-type-lost-tp1584379p1584464.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] asdate parsing

2010-03-06 Thread ManInMoon
I have text date colum with dates such at 290210 which I can parse with %d%m%y but I also have date without leading zeo i.e. 10210 (Ist Feb 2010) which cause any NA. How can I parse the second one? -- View this message in context: http://n4.nabble.com/as-date-parsing-tp1582868p1582868.html

[R] Data frame query

2010-03-05 Thread ManInMoon
I have created a large dataframe (d) by getting data from file using read.table I now have 79 columns and 3 million rows. How can I plot the 6th column? I tried plot(d[,6]) but it doesn't look right. When I try to do just d[,6] the console gets some odd levels message I don't understand Moon --

[R] Data frame column

2010-03-05 Thread ManInMoon
I have a big data frame and I have extracted a bit by doing: y-d[1:10,6] y [1] Headings 0-49 -98 -49 -41 -120 -155 -204 -169 92329 Levels: -0 -1 -10 -100 -1000 -1 -10001 -10002 -10003 -10004 -10005 -10006 -10007 -10008 -10009 -1001 -10010 -10011

[R] Plot help

2010-03-04 Thread ManInMoon
Is there an easy way to do two things: I have a dataframe with headers and 18 columns I want to plot all the columns on same y axis plot(df) does this. BUT 1. There is no legend, the legend function seems pedantic - surely there must be an easy way to just pick up my headers? 2. How do I