Displaying 6 results from an estimated 6 matches for "leapyear".
2008 Oct 10
2
Leap year?
Given a Date object or simply a year is there an R function to tell me if the it is a leap year or not? I was hoping for something like 'is.leapyear'. I probably can build my own function (year divisible by 4 etc.) but I would rather use an existing function if it is available.
Thank you.
Kevin
2011 Feb 28
0
MultiDimensional arrays
....nc")
v2 <- woodstorks$var[[2]] # longname
"probability_of_successful_foraging_cycle_daily"
DaysToMonth365 <- c(0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334,
365)
DaysToMonth366 <- c(0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335,
366)
Lyear <- isLeapYear(2000:2009) # returns boolean vector TRUE FALSE for
years in sequence
start_year<- 1999 # we process 11 years with 265 daily data records in
a 287 x 405 row x column map.
for(t in 1:11) {
currentYear = start_year + t
leapYear <- isLeapYear(currentYear:currentYear) # returns boo...
2011 Mar 26
0
NetCDF - rolling means and StdDev
...n_2000_2009.nc")
print(woodstorks)
print(v2)
# next two lines create index values for temporal sequences.
DaysToMonth365 <- c(0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334,
365)
DaysToMonth366 <- c(0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335,
366)
Lyear <- isLeapYear(2000:2009) # returns boolean TRUE FALSE vector for
years in sequence
# next function is used latter in script see line 50
processMonth<-function(x){
print(x)
}
start_year<- 1999
# initiates 1 year before to capture December of correct year, next line
uses the for loop t...
2005 Jul 14
0
dialplan logic, logical not
...code is how I would write the check in C. According to the wiki there
isn't a logical NOT as a valid expression. From reading the
asterisk/docs/README.variables, this seems to be missing.
int year = 2005;
if ( (year % 4 = 0) && !(year % 100 = 0) && (year % 400 = 0) ) {
leapyear = true;
}
--johann
2008 Sep 09
1
'xtfrm' performance (influences 'order' performance) in R devel
...Function: index (package AHLCalendar)
x="TimeDate", y="POSIXt"
x="TimeDate", y="Time"
x="TimeDate", y="TimeDate"
Function: initialize (package methods)
.Object="TimeDate"
(inherited from: .Object="ANY")
Function: leapYear (package AHLCalendar)
x="TimeDate"
Function: mday (package AHLCalendar)
x="TimeDate"
Function: mode (package base)
x="TimeDate"
(inherited from: x="TimeDateBase")
Function: mode<- (package base)
x="TimeDate", value="character"...
2011 Dec 13
4
sum with dates
How do I sum 15 years to my dataset?
original dataset
dates val
1 2001-01-12 1.2
2 2001-02-12 1.2
3 2001-03-12 1.2
result
dates val
1 2016-01-12 1.2
2 2016-02-12 1.2
3 2016-03-12 1.2