similar to: Create a time interval from a single time variable

Displaying 20 results from an estimated 100 matches similar to: "Create a time interval from a single time variable"

2012 Jan 05
1
Fwd: WHO Anthro growth curve macros and R&In-Reply-To=<CAAOCNNZawGtKkWpgFMYADSyxWGTeWEDxqVVHv7=Azo=1G+H9gg@mail.gmail.com>
Dear Gustaf, I wish you a happy new year! I am a PhD Staff at LSHTM and I have been trying to use WHO anthro macros in R with the file you posted on internet but when I double check the WHZ, HAZ, WAZ output with output from ENA or STATA, it differs slightly. Do you have any idea why that might be the case? Many thanks Severine
2006 Mar 22
2
Asterisk perms in manager.conf
Hi, can someone sched a light what exactly mean the read write permissions in manager.conf? [public] secret = private deny=0.0.0.0/0.0.0.0 permit=10.0.0.0/255.255.0.0 read = system,call,log,verbose,command,agent,user write = system,call,log,verbose,command,agent,user Lets say I want some users to use dial through manager interface. But don't want to allow them to run asterisk commands?
2002 Sep 17
1
Using rsync for two-waz-synchronisation
Hello, is there any way to use rsync for two-way-syncronisation? I want to use it to keep the data on two hosts consistent. Sometimes one of this hosts (sometimes the first, sometimes the second) changes its location. If the two hosts are at the same location I want automatically rsync them. The data only changes at one hosts but it is not defined on which host it changes. For example: I have
2012 Jul 18
2
loop searching the id corresponding to the given index (timestamp)
Hello, I have the following loop for two data sets: diveData_2008 and diveData_2009. It uses two other data: diveCond_all and fishTable. The problem is at the point to identify the dive_id for the given index (index is timestamp). It keeps on saying for the1st loop Error in fishReport$dive_id[i] <- dive_id : replacement has length zero for the 2nd loop Error in fishReport$dive_id[i + j] <-
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",
2012 Apr 19
1
SmoothTrend in OpenAir
I'm trying to plot smooth trend using smoothTrend in OpenAir but I'm having problems. I used the following code. --------------------------------------------------------------------------------- #Set my working dir to the dir with my files setwd("c:/R") #Load the openair library library(openair) #Load the data mydata <- read.table("MCNP-pH.csv", header=TRUE,
2008 Apr 29
1
data management (subsetting and recombining)
This is an example of two months of data from a twenty four month data set that I would like to apply this too. These data are subsets of the same stations throught time, but differing ones were included on different sampling dates. I would like to subset these data and then put them together as a big matrix with the by column being RiverMile. What is the easiest way to proceed as this is a
2008 Apr 29
1
merging multiple data frames with different numbers of rows
merge can only merge two objects at a time- I would like to merge more than two objects at a time. s.d <- structure(list(RiverMile = c(202L, 198L, 190L, 185L, 179L, 148L, 119L, 61L)), .Names = "RiverMile", row.names = c(NA, -8L), class = "data.frame") #s.d is all of the river miles that can occur in all of the data frames that I want to put together feb06 <-
2017 Jan 11
2
R 'base' returning 0 as sum of NAs
Dear R Team The following line returns 0 (zero) as answer: sum(c(NA_real_, NA_real_, NA_real_, NA_real_), na.rm = TRUE) One would, however, have expected it to return 'NaN', as is the case with function 'mean': > mean(c(NA_real_, NA_real_, NA_real_, NA_real_), na.rm = TRUE) [1] NaN The problem in other words: I have a vector filled with missing numbers. I run the
2004 Jan 08
3
S3, S4, namespace
I have encountered an issue which I have been unable to resolve, involving an S3 generic (print) being declared S4 generic in a package, and the method being exported. This all works fine - the problem occurs when I try to import the method to another package. Here is the bit that works fine. ------------- #the .r file for package bar
2017 May 19
2
Inconsistency in handling of numeric input with %d by sprintf
Consider #as.numeric for emphasis sprintf('%d', as.numeric(1)) # [1] "1" vs. sprintf('%d', NA_real_) > Error in sprintf("%d", NA_real_) : invalid format '%d'; use format %f, %e, %g or %a for numeric object > I understand the error is correct, but if it works for other numeric input, why doesn't R just coerce NA_real_ to NA_integer_?
2020 May 23
2
Should 0L * NA_integer_ be 0L?
I don't see this specific case documented anywhere (I also tried to search the r-devel archives, as well as I could); the only close reference mentions NA & FALSE = FALSE, NA | TRUE = TRUE. And there's also this snippet from R-lang: In cases where the result of the operation would be the same for all > possible values the NA could take, the operation may return this value. >
2009 Apr 30
2
NA_real_ <op> NaN -> NA or NaN, should we care?
On Linux when I compile R 2.10.0(devel) (src/main/arithmetic.c in particular) with gcc 3.4.5 using the flags -g -O2 I get noncommutative behavior when adding NA and NaN: > NA_real_ + NaN [1] NaN > NaN + NA_real_ [1] NA If I compile src/main/arithmetic.c without optimization (just -g) then both of those return NA. On Windows, using a precompiled R 2.8.1 from CRAN I get NA for
2015 Jun 01
2
sum(..., na.rm=FALSE): Summing over NA_real_ values much more expensive than non-NAs for na.rm=FALSE? Hmm...
I'm observing that base::sum(x, na.rm=FALSE) for typeof(x) == "double" is much more time consuming when there are missing values versus when there are not. I'm observing this on both Window and Linux, but it's quite surprising to me. Currently, my main suspect is settings in on how R was built. The second suspect is my brain. I hope that someone can clarify the below
2017 May 23
2
Inconsistency in handling of numeric input with %d by sprintf
I initially thought this is "documented behaviour". ?sprintf says: Numeric variables with __exactly integer__ values will be coerced to integer. (emphasis mine). Turns out this only works when the first value is numeric and not NA, as shown by the following example: > sprintf("%d", as.numeric(c(NA,1))) Error in sprintf("%d", as.numeric(c(NA, 1))) : invalid
2023 Nov 06
1
c(NA, 0+1i) not the same as c(as.complex(NA), 0+1i)?
Hmm, it is not actually at odds with help(c), it is just that the autocoercion works different that it used to, so that as.complex(NA) == as.complex(NA_real) == NA_real_+0i) which now differs from NA_complex although both print as NA. I haven't been quite alert when this change was discussed, but it does look a bit unfortunate that usage patterns like c(NA, 0+1i) does not give complex NA
2023 Apr 14
1
Possible inconsistency between `as.complex(NA_real_)` and the docs
Hi all, Surprisingly (at least to me), `as.complex(NA_real_)` results in `complex(real = NA_real_, imaginary = 0)` rather than `NA_complex_`. It seems to me that this goes against the docs of `as.complex()`, which say this in the Details section: "Up to R versions 3.2.x, all forms of NA and NaN were coerced to a complex NA, i.e., the NA_complex_ constant, for which both the real and
2017 May 23
2
Inconsistency in handling of numeric input with %d by sprintf
https://github.com/Rdatatable/data.table/issues/2171 The fix was easy, it's just surprising to see the behavior change almost on a whim. Just wanted to point it out in case this is unknown behavior, but Evan seems to have found this as well. On Tue, May 23, 2017 at 12:00 PM, Michael Chirico <michaelchirico4 at gmail.com > wrote: > Astute observation. And of course we should be
2020 Jan 01
2
New R function is.nana = is.na & !is.nan
Hello R-devel, Best wishes in the new year. I am writing to kindly request new R function so NA_real_ can be more easily detected. Currently if one wants to test for NA_real_ (but not NaN) then extra work has to be done: `is.na(x) & !is.nan(x)` Required functionality is already at C level so to address my request there is not that much to do. Kevin Ushey made a nice summary of current R C api
2008 Apr 02
1
"[<-" plus drop-type extra argument
Hello I am writing a replacement method for an S4 class and want to pass an additional argument to "[<-"() along the lines of "["()'s "drop" argument. Specifically, I have an S4 class, call it "foo", with a slot 'x' that is a vector and a slot 'NC' that is a scalar. I want to be able to pass a Boolean argument to the