Re: [R] maptools sunrise sunset function

2008-11-10 Thread Farley, Robert
, November 08, 2008 17:09 To: R-help Subject: Re: [R] maptools sunrise sunset function Nevermind, when one puts in the proper coordinates in decimal degrees everything works just fine. thanks for you patience, Stephen On Sat, Nov 8, 2008 at 7:40 PM, stephen sefick [EMAIL PROTECTED] wrote

Re: [R] maptools sunrise sunset function

2008-11-10 Thread stephen sefick
] On Behalf Of stephen sefick Sent: Saturday, November 08, 2008 17:09 To: R-help Subject: Re: [R] maptools sunrise sunset function Nevermind, when one puts in the proper coordinates in decimal degrees everything works just fine. thanks for you patience, Stephen On Sat, Nov 8, 2008 at 7:40 PM

Re: [R] maptools sunrise sunset function

2008-11-10 Thread Sebastian P. Luque
On Mon, 10 Nov 2008 11:20:03 -0800, Farley, Robert [EMAIL PROTECTED] wrote: I have a time zone problem. Running the code provided I get the result in UTC, and a lot of warnings like this: 28: In as.POSIXlt.POSIXct(x, tz) ... : unknwon timezone 'PST' sunrise.set(34.11583, -118.18719,

Re: [R] maptools sunrise sunset function

2008-11-10 Thread stephen sefick
library(maptools) sunrise.set - function(lat, long, date, timezone=UTC, num.days=1){ #this needs to be long lat# lat.long - matrix(c(long, lat), nrow=1) day - as.POSIXct(date, tz=timezone) sequence - seq(from=day, length.out=num.days , by=days) sunrise -

Re: [R] maptools sunrise sunset function

2008-11-10 Thread Prof Brian Ripley
] maptools sunrise sunset function Nevermind, when one puts in the proper coordinates in decimal degrees everything works just fine. thanks for you patience, Stephen On Sat, Nov 8, 2008 at 7:40 PM, stephen sefick [EMAIL PROTECTED] wrote: ##This is a function that I am trying to write to calculate

Re: [R] maptools sunrise sunset function

2008-11-10 Thread Sebastian P. Luque
On Mon, 10 Nov 2008 15:27:52 -0500, stephen sefick [EMAIL PROTECTED] wrote: library(maptools) sunrise.set - function(lat, long, date, timezone=UTC, num.days=1){ #this needs to be long lat# lat.long - matrix(c(long, lat), nrow=1) day - as.POSIXct(date, tz=timezone) sequence - seq(from=day,

Re: [R] maptools sunrise sunset function

2008-11-10 Thread stephen sefick
try tz=America/Los_Angeles it was three hours before tz=America/New_York On Mon, Nov 10, 2008 at 4:25 PM, Sebastian P. Luque [EMAIL PROTECTED] wrote: On Mon, 10 Nov 2008 15:27:52 -0500, stephen sefick [EMAIL PROTECTED] wrote: library(maptools) sunrise.set - function(lat, long, date,

Re: [R] maptools sunrise sunset function

2008-11-08 Thread stephen sefick
Nevermind, when one puts in the proper coordinates in decimal degrees everything works just fine. thanks for you patience, Stephen On Sat, Nov 8, 2008 at 7:40 PM, stephen sefick [EMAIL PROTECTED] wrote: ##This is a function that I am trying to write to calculate sunrise and sunset and works

[R] maptools sunrise sunset function

2008-11-08 Thread stephen sefick
##This is a function that I am trying to write to calculate sunrise and sunset and works mostly, but returns nonsensical values. What am I #missing? Thanks in advance. ###remember to include maptools as dependence### library(maptools) sunrise.set - function(lat, long, date, timezone=UTC,