Displaying 20 results from an estimated 200 matches similar to: "code reduction (if anyone feels like it)"
2008 Apr 21
1
Adding number of non-NAs to boxplot
boxplot(x[,c(2,15,28,41,54,67,80,93,106)], ylab="mg/s", names=c("RM215",
"RM202", "RM198", "RM190", "RM185", "RM179", "RM148", "RM119", "RM61"))
this is the code I am using to make a standard box plot. Is there a way to
get the number of NA observations plotted onto the graph easily. I can
always
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",
2008 Jun 19
1
PrettyR (describe)
#is there a way to get NA in the table of descriptive statistics instead of
the function stopping Thank you in advance
#data
x.f <- structure(list(Site = structure(c(9L, 9L, 9L, 9L, 9L, 9L, 9L,
9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L,
9L, 9L, 9L, 9L), .Label = c("BC", "HC", "RM119", "RM148", "RM179",
"RM185",
2008 Mar 10
1
reorder x-axis
read.table("bug.txt", header=TRUE)
plotMeans(bug$tot, bug$station, error.bars="se", main="Total")
The plot is ordered in this way HC RM190 RM198 RM202.
I would like it to plot in this way HC RM202 RM198 RM190.
thanks
Stephen
Is this okay or would you like the data to be copied and pasted into
the message body. I am trying to optimize my postings.
--
Let's
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
2011 Sep 24
2
maptools::sunriset() daylight savings to stardard time change
Hello all,
After beating my head against the wall for a few hours, I give up.
I have two problems.
1. If I use seq() to generate a POSIXct series that crosses a daylight savings to stardard time change I get two values for the first day of change. The time change is Nov 6,2011. The value for Nov 7 turns into 23:00 on Nov 6, thus two values for Nov 6. (see below)
So I put a time value (noon)
2008 May 08
0
RSEIS could you help
I have dissolved oxygen traces that are continuous (fifteen minutes) for
two years (save for a couple of days, weeks, or minutes there depending on
the perogative of the river). These traces are spaced out by river mile. I
have figured out how to prepare data as to the sunspot example, but I can
not figure out how to get multiple traces into the prepSEIS function and
this is the warning that I
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 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
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")))
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 Oct 23
4
daylight
hi there,
does anyone know how to calculate the amount of daylight on every day of the
year in R? I mean the time between sunrise and sunset.
thanks
--
View this message in context: http://r.789695.n4.nabble.com/daylight-tp4647213.html
Sent from the R help mailing list archive at Nabble.com.
2007 Jan 17
1
sp: proj4string has no impact
Hi all,
I'm faced with a problem applying the sp package: The projection argument in
readShapePoly(Shapefile,proj4string="CRS class argument")
e.g.: CRS("+proj=aea +lat_1=46 +lat_2=73 +lat_0=60 +lon_0=84 +x_0=0
+y_0=0 +ellps=clrk66 +units=m +no_defs")
doesn't have any impact on the plotted object. I also tested the simple
example:
xy = cbind(x = 2 * runif(100) -
2008 May 16
0
wmtsa (wavCWT)
I can send data along, but it is too large for the list:
I am using wmtsa and the function wavCWT
I would like to use the range.scale to only evaluate a subset of
frequencies.
deltat of the time series that I am trying to analyze is 1
d = wavCWT(RM202.ts, range.scale = c(96, 2688))
and I get the error message
Error in wavCWT(RM202.ts, scale.range = c(96, 2688) :
Minimum scale must be greater
2017 Jun 30
0
Unit of cellsize in 'ascgen' from adehabitatMR? Spatialpoints unit?
Hello dear all,
A simple understanding question but I cannot find the answer anywhere.
I use coordiates (longitude, latitude) in my study. I created a
SpatialPoints class from those data and then I created a grid using the
'ascgen' command in the package 'adehabitatMR' like:
ascgen(xy,cellsize=40).
It worked out fine and my analysis is doing great. But I don't know what
2012 Jun 05
2
Converiting longitude/latitude to utm
Dear all,
I have been trying to convert coordinates from longitude/latitude to utm
but I got an error. As soon as the longitude coordinate is greater than 90,
I get the folloowing error message: "error in pj_transform: latitude or
longitude exceeded limits"
Here is what I did:
SP<-SpatialPoints(cbind(126.59,-14.30),proj4string=CRS("+proj=longlat"))
2008 Aug 19
4
converting coordinates from utm to longitude / latitude
Hi,
is there a function in R to convert data read with read.shape and which is originally in UTM coordinates into longitude / latitude coordinates?
I found the convUL() function from the PBSmapping package but I have no idea how I could apply that to the read.shape object.
Many thanks,
Werner
__________________________________________________
Do
sragenden Schutz gegen Massenmails.
2012 Oct 18
1
spTransform longlat to utm
Dear all,
I am trying to project my LongLat-maps to a plane.
The ultimate purpose is to do a search of points in vicinity of other points using overlay-commands (sp) with radius in km.
I am applying spTransform (package rgdal) and it gives my some curious results.
An example.
Let's take a point lying somewhere in Germany, zone=32U
x <- 8.968735
y <- 49.454735
After conversion I
2019 Jan 28
2
Just an interesting data point [CyberPower SNMP]
On 1/27/19 9:13 PM, Charles Lepple wrote:
> On Jan 27, 2019, at 2:36 PM, Phil Stracchino <phils at caerllewys.net
> <mailto:phils at caerllewys.net>> wrote:
>> The new Cyberpower PR3000 (also 3KVA), wqhich operates at a 90% power
>> factor, considers this same load to be 43% load.
>>
>> I wasn't expecting that much of a reduction.
>
> So... 50%
2005 Jun 09
1
Using transform on spproj package.
Hi,
I'm trying to use transform my mercator locations into utm but I'm doing
something wrong because only x is transformed ... see
> xy.sp
SpatialPoints:
loni lati
[1,] -8.85 38.16
[2,] -9.19 37.99
[3,] -9.11 37.97
[4,] -9.06 38.15
[5,] -9.03 37.87
[6,] -9.14 37.81
[7,] -9.09 37.70
[8,] -8.95 37.45
[9,] -9.17 37.37
[10,] -9.00 37.34
Coordinate Reference