[R] Help with format()

2011-08-19 Thread Michael Karol
R Users: Can anyone please help me with the following: I'm unclear as to how to get format to do what I want. I've tried the following and get unexpected results. Input. val-321.6 format(val, digits=1) format(val, digits=2) format(val, digits=3) format(val, digits=4) format(val,

Re: [R] Help with format()

2011-08-19 Thread David Winsemius
On Aug 19, 2011, at 10:23 AM, Michael Karol wrote: R Users: Can anyone please help me with the following: I'm unclear as to how to get format to do what I want. I've tried the following and get unexpected results. Input. val-321.6 format(val, digits=1) format(val, digits=2)

[R] r help date format changes with c() vs. rbind()

2010-02-19 Thread Tim Clark
Dear List, I am having a problem with dates and I would like to understand what is going on. Below is an example. I can produce a date/time using as.POSIXct, but I am trying to combine two as.POSIXct objects and keep getting strange results. I thought I was using the wrong origin, but

Re: [R] r help date format changes with c() vs. rbind()

2010-02-19 Thread jim holtman
I have used the following function to convert to POSIXct from a numeric without any problems: unix2POSIXct - function (time) structure(time, class = c(POSIXt, POSIXct)) unix2POSIXct(946764000) [1] 2000-01-01 17:00:00 EST On Fri, Feb 19, 2010 at 4:07 PM, Tim Clark mudiver1...@yahoo.com

Re: [R] r help date format changes with c() vs. rbind()

2010-02-19 Thread Tim Clark
Department of Zoology University of Hawaii --- On Fri, 2/19/10, jim holtman jholt...@gmail.com wrote: From: jim holtman jholt...@gmail.com Subject: Re: [R] r help date format changes with c() vs. rbind() To: Tim Clark mudiver1...@yahoo.com Cc: r-help@r-project.org Date: Friday, February 19