Displaying 20 results from an estimated 300 matches similar to: "maptools::sunriset() daylight savings to stardard time change"
2009 Jan 19
1
maptools, sunriset, POSIX timezones
Hi ...
I wonder if anyone can provide some insight into why the first three
examples using the sunriset function (appended below, with results) give
the correct answer, but the fourth generates and error.
The first two use ISOdatetime with and without a time zone attribute,
and the sunriset function returns the correct sunset time.
The third and fourth adds 10 seconds to the ISOdatetime
2008 Nov 09
1
maptools sunrise sunset function
##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", num.days=1){
#this needs to be long lat#
lat.long <- matrix(c(long, lat),
2008 Jul 15
1
code reduction (if anyone feels like it)
# I am sure that I could be more efficient than this but how? Thanks in
advance.
#GPS in Decimal Degrees in the form longitude latitude
RM215 <- matrix(c(-82.1461363, 33.5959109), nrow=1)
SC <- matrix(c(-82.025888, 33.606454), nrow=1)
RM202 <- matrix(c(-81.9906723, 33.5027653), nrow=1)
RM198 <- matrix(c(-81.926823, 33.4634678), nrow=1)
HC <- matrix(c(-81.920505, 33.46192), nrow=1)
2008 Jul 15
2
POSIXct extract time
RM215.sp <- SpatialPoints(RM215, proj4string=CRS("+proj=longlat
+datum=WGS84"))
d060101 <- as.POSIXct("2006-01-01", tz="EST")
study_seq <- seq(from=d060101, length.out=761, by="days")
up.215 <- sunriset(RM215.sp, study_seq, direction="sunrise",
POSIXct.out=TRUE)
down.215 <- sunriset(RM215.sp, study_seq, direction="sunset",
2009 Oct 08
2
lattice: passing multiple lty values to the key/legend
hi all,
It's not clear to me how (or if) I can pass multiple values for lty to a key in xyplot?
I've tried: lines=list(lty=1:3), to no avail.
Do I need to use something other than auto.key?
(Deepayan, if you're out there, I have your book and must admit the answer isn't jumping out at me.)
thanks in advance!
Michael Folkes
example code:
#____________________________
2013 Sep 09
1
Hmisc binconf function value interpretation during narrow confidence intervals
Hello all,
I've been using binconf (package Hmisc) at a range of alpha values and
noticed that using the 'Wilson' method when alpha is larger (i.e. narrow
CI), results in the upper value being smaller than the lower value. The
'exact' and 'asymptotic' methods give results in the realm I'd expect.
But the help file suggests:
"Following Agresti and Coull, the
2008 Nov 10
1
TimeZone Help - Finding TimeZone codes
I have looked at
?as.POSIXct
?POSIXct
and many of the references that are on those pages.
I am bewildered with timezones. Is there a way to get what would go
into tz="" for making a function that uses POSIXct to be able to be
used in all of the timezones in just the united states? This is for
both windows and mac...
this is the function that I am wanting to use it with
2011 Mar 04
4
Floating points and floor() ?
Perhaps somebody could clarify for me if the following is a floating
point matter or otherwise, and how am I to correct for it?
> floor(100*.1)
[1] 10
> 100*(1.0-.9)
[1] 10
> floor(100*(1-0.9))
[1] 9
Thanks!
Michael
_______________________________________________________
Michael Folkes
Salmon Stock Assessment
Canadian Dept. of Fisheries & Oceans
Pacific Biological Station
2011 Apr 04
2
RODBC excel - need to preserve (or extract) numeric column names
I'm using RODBC to read an excel file (not mine!). But I'm struggling to find a way to preserve the column names that have a numeric value. sqlFetch() drops the value and calls them f1, f2, f3,... (ie field number). this is a different approach from read.csv, which will append "V" prior to the numeric column name. sqlFetch isn't so helpful.
Is there a way to get the
2011 Aug 17
3
Convert week value to date
Hello all,
I'm hoping to convert a decimal value for week of the year back to a date object.
Eg:
strptime(paste(2010,1:52,sep=" "),format="%Y %W")
I expected (hoped?) this would give me the date for Monday of each week. Instead, it's giving me 52 values of today's date.
Where am I erring?
Thanks
Michael
_______________________________________________________
2007 Jul 10
2
Plot SpatialLinesDataFrame with xlim & ylim
I'm running windows xp, R 2.3.1 with maptools 0.6-6, I guess.
When plotting from a large SpatialLinesDataFrame and using xlim & ylim to reduce the area, the plot axes automatically have the same scale size, even if xlim and ylim ranges differ.
E.g.:
tmp <- readShapeLines(filepath)
plot(tmp,xlim=c(-126,-119),ylim=c(50,51))
The y-axis range is actually 47-54, same range as the x-axis.
2007 Apr 01
2
CentOS + GNU Zebra
Hi folks,
At work, we're considering the idea to replace the presente router with
a stardard box with CentOS as a SO and GNU Zebra as a routing software.
The line is a 4Mbps SDSL.
?What do you think about Zebra and what are your experiencies with it?
Any feedback will be so appreciated.
TIA.
2002 Nov 07
2
The integration of the square of the c.d.f of normal distribution
Assume F(x) is the cdf of stardard normal c.d.f,
and want to get the integration of F(x)^2 over
(-infinite, +infinite).
So whats the value of this integration?
And is there some function to achieve this?
Thanks.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info",
2004 Jun 21
2
sunrise, sunset calculation
Are there any functions available to calculate sunrise and sunset times
for given latitude,longitude and dates?
If not, I'll appreciatte any pointers to C code I could use/port.
Thanks,
Angel
2012 Apr 30
1
Subtract days to dates in POSIXct format
Hello,
I'm having problems working with date values in POSIXct format. Here is what I got (eg.lig attached):
x <- read.table("eg.txt", sep = ',', col.names=c("ok","time","secs","lig")) # it gives time as factor
z <- cbind(x,colsplit(x$time, split="\\s", names=c("date", "clock")))
2013 Jun 12
1
Instant search for R documentation
Hi,
I just wanted to share with you that we made a website over the weekend that allows "instant search" of the R documentation on CRAN, see: www.Rdocumentation.org. It's a first version, so any feedback/comments/criticism most welcome.
Best regards,
Jonathan
[[alternative HTML version deleted]]
2011 Jan 27
1
binomial dist: obtaining probability of success on each trial
I'm trying to fathom how to answer two example problems (3.3.2 & 3.3.3) in:
Krishnamoorthy. 2006. "handbook of statistical distributions with applications"
The first requires calculating single trial probability of success for a binomial distribution when we know:
trial size=20, successes k=4, P(x<=k)=0.7
Appreciably all the binomial functions are requiring "prob",
2008 Nov 04
1
contour plot, failing to interpolate through all data
I'm having trouble making contour lines for this attached, sparse
dataset (low data:NA ratio!). Is it the high number of NA's, or funny
layout of the densities, or something else that's causing this? This is
a subsample of the dataset, and I get the same problem when using the
full data. The only reason I get any contours is because I'm forcing
specific levels. If no levels are
2010 Mar 26
23
RAID10
Hi All,
I am looking at ZFS and I get that they call it RAIDZ which is similar to RAID 5, but what about RAID 10? Isn''t a RAID 10 setup better for data protection?
So if I have 8 x 1.5tb drives, wouldn''t I:
- mirror drive 1 and 5
- mirror drive 2 and 6
- mirror drive 3 and 7
- mirror drive 4 and 8
Then stripe 1,2,3,4
Then stripe 5,6,7,8
How does one do this with ZFS?
2009 Oct 08
1
problem understanding factor levels for use lattice panel order
Hello all,
In order to get the desired order of panels within lattice I realized I needed to define my factor levels.
I now see how to properly do it (attached code), but:
1. I don't understand why I have to use factor() on a variable that is already a factor, and why levels() alone doesn't work to readjust the level order.
2. I just noticed that if I do use levels(xx$v1), it's