similar to: as.Date

Displaying 20 results from an estimated 1000 matches similar to: "as.Date"

2016 Apr 18
0
as.Date
The most important thing is that Date objects by definition do not include time of day. You want to look at ISOdatetime() and as.POSIXct() instead. And beware daylight savings time issues. -pd On 18 Apr 2016, at 15:09 , Ogbos Okike <giftedlife2014 at gmail.com> wrote: > Dear All, > > I have a data set containing year, month, day and counts as shown below: > data <-
2016 Apr 18
1
as.Date
Dear ALL, Thank you so much for your contributions. I have made some progress. Below is a simple script I gleaned from your kind responses: Sys.setenv(TZ="Etc/GMT") dates <- c("02/27/92", "02/27/92", "01/14/92", "02/28/92", "02/01/92") times <- c("23:0:0", "22:0:0", "01:00:00", "18:0:0",
2016 Apr 18
0
as.Date: fixed
Dear All, Many thanks for bailing me out. Ogbos On Apr 18, 2016 9:07 PM, "David Winsemius" <dwinsemius at comcast.net> wrote: > > > On Apr 18, 2016, at 10:44 AM, Ogbos Okike <giftedlife2014 at gmail.com> > wrote: > > > > Dear ALL, > > Thank you so much for your contributions. > > I have made some progress. Below is a simple script I
2018 Jan 22
2
Manipulating two large dataset differing by date and time
Dear Members, Compliments of the Season!! Below is a part of a code I use for Fourier analysis of signals. The code handles data with the format 05 01 01 8628 (year, month, day and count) 05 01 02 8589 (year, month, day and count) The sample data is attached as 2005daily.txt. I would like to adapt the code to handle data of the form: 05 01 01 00 4009
2018 Jan 22
0
Manipulating two large dataset differing by date and time
Hi Ogbos, You can just use ISOdate. If you pass more values, it will process them: ISOdate(2018,01,22) [1] "2018-01-22 12:00:00 GMT" > ISOdate(2018,01,22,18,17) [1] "2018-01-22 18:17:00 GMT" Add something like: if(is.null(data$hour),data$hour<-12 then pass data$hour as it will default to the same value as if you hadn't passed it. Jim On Mon, Jan 22, 2018 at 6:01
2009 Aug 27
2
chooseCRANmirror()
Hello, I am runing linux on Ubuntus. I find it difficult to install R packages. I am in South Africa. It always asked me to choose the nearest CRAN mirror. I normally choose South Africa and once I clicked Ok, the error message pasted below will appear. Please I am a new student of R and Ubuntus. The other warning "argument 'lib' is missing: using
2003 Nov 19
5
ISOdate returns incorrect date?
Dear all, I have found the following (for me) incomprehensible behaviour of ISOdate (POSIXct): > ISOdate(1900,6,16) [1] "1900-06-15 14:00:00 Westeurop?ische Sommerzeit" > ISOdate(1950,6,16) [1] "1950-06-16 14:00:00 Westeurop?ische Sommerzeit" Note that in the first case I get the 15th of June back, not the 16th as I would have expected! This happened under R-1.7.1 on
2016 Apr 30
3
Could not find function "pointsToRaster"
Dear All, I have a script that draws longitude and latitude of lightning occurrence. This script was running fine before. But when I changed my system and do a fresh install on another laptop, this error persist. source("script") Error in eval(expr, envir, enclos) : could not find function "pointsToRaster" I have tried to see if there is any other package I need to install
2003 Nov 14
5
ISOdate() and strptime()
Dear R-people! I am using R 1.8.0, under Windows XP. While using ISOdate() and strptime(), I noticed the following behaviour when "wrong" arguments (e.g., months>12) are given to these functions: > ISOdate(year=2003,month=2,day=20) #ok [1] "2003-02-20 13:00:00 Westeurop?ische Normalzeit" > ISOdate(year=2003,month=2,day=30) #wrong day, but returns a value [1]
2007 Mar 22
2
difftime / RBloomberg
hi, I've troubles with some difftime objects. e.g. ISOdate(2001, 4, 26) - ISOdate(2001, 2, 26) - 2 works, telling me "Time difference of 57 days". But when I'd like to add days, such as ISOdate(2001, 4, 26) - ISOdate(2001, 2, 26) + 2 the function gives me an error. Function "as.COMDate.chron" of the Rbloomberg package doesn't work for that reason. I'm
2011 Jan 26
3
adding error bars
Dear all, I am trying to add error bars on a boxplot but have encountered an error as indicated below. Is there a package I need to install or a library I have to load before this goes please. Thanks for any idea. Ogbos x<-replicate(20,rnorm(50)) boxplot(x,notch=TRUE,main="Notched boxplot with error bars") error.bars(x,add=TRUE) Error: could not find function "error.bars"
2009 Aug 27
2
Installing R Packages on ubuntus
Hello, Please I am a learner. My operating system is ubuntus and I am trying to install raster package from R-forge site. I entered sudo apt-get install r-base-dev on the command line and that worked fine. I then typed R at the command line so as to run R. Inside R, I typed > install.packages("raster",repos="http://R-Forge.R-project.org<http://r-forge.r-project.org/>")
2010 Oct 14
1
installing grid package
Hi all, I can't understand why grid package failed to installed on my machine. Can anybody have a look and advice on where I am missing it. My R version is 2.9.2. After untarring: tar xzvf grid_0.7-4.tar.gz, I tried to configure or make but none worked, 'no such files'. I have also tried using : sudo R CMD INSTALL /home/ogbos/Desktop/goo/grid_0.7-4.tar.gz which also resulted in the
2009 Aug 25
2
latitude and longitude distribution
Good day to you all, I have lightning data containing date, time, latitude and longitude. I hope that distribution of latitude and longitude will give number of lightning occurrence in a region. I have used factor function to sum up the number of events on latitude and longitude axis and saved as x and y. But when I tried to plot the two, I had and error message ( Error in image.default(x, y, z) :
2010 Mar 09
3
Removing Zeros from matrix
Hi Everybody, I have a matrix of about 45 columns. Some of the rows contain zeros. Using >data1<-data[complete.cases(data),], I can remove the "NA" rows. But I am unable to tackle that of zeros. Can anybody give me an idea of how to remove rows containing zeros in a matrix. Thanks so much Best Ogbos [[alternative HTML version deleted]]
2007 May 10
3
Getting the last day of the month.
Hi, Given a date, how do I get the last date of that month? I have data in the form YYYYMM, that I've read as a date using > x$Date <- as.Date(ISOdate(substr(x$YearEnd,1,4),substr(x$YearEnd,5,6),1)) But this gives the first day of the month. To get the last day of the month, I tried > as.Date(as.yearmon(x$Date,frac=0)) But I don't get the last day of the month here. (Tried
2024 Mar 29
2
Output of tapply function as data frame: Problem Fixed
Dear Rui, Thanks again for resolving this. I have already started using the version that works for me. But to clarify the second part, please let me paste the what I did and the error message: > set.seed(2024) > data <- data.frame( + Date = sample(seq(Sys.Date() - 5, Sys.Date(), by = "1 days"), 100L, + TRUE), + count = sample(10L, 100L, TRUE) + ) > > # coerce
2010 Jun 07
2
Polar coordinate
Greetings to you all. I have two datasets - Time and magnitude. For a particular location, the magnitude of the parameter varies with time. I wish to obtain a polar coordinate distribution of time (0-24h) and magnitudes so as to visualize how magnitude varies with different times of the day (e.g., morning, midnight hours). I have searched for "polar coordinates in R" but could not get
2011 Jul 27
2
Expression: +/-sigma
Dear List, I am trying to label a plot with the symbol +/- sigma. Using something like - expression (2*sigma) gives me the symbol 2ó. However, adding +/- to it beats me. The code I am using is: plot(x,y,type="l",main=" expression(paste("±", plain(2*ó)),sep=""). Any suggestion will be appreciated. Best Ogbos [[alternative HTML version deleted]]
2002 May 21
1
I() fails on objects of class POSIXct (PR#1587)
Although the documentation is somewhat sketchy, I() can be used to create objects of class AsIs: > I("a") [1] "a" attr(,"class") [1] "AsIs" "character" > I(4) [1] 4 attr(,"class") [1] "AsIs" "numeric" > I(4 + 0i) [1] 4+0i attr(,"class") [1] "AsIs" "complex" > This