similar to: Creating categories from a date-time object

Displaying 20 results from an estimated 10000 matches similar to: "Creating categories from a date-time object"

2011 Dec 12
3
Variables from a Dataframe
Hello everyone, I want make a variable selection  from a dataframe, but when I build this new object (using cbind) the new table (which is a matrix) I lost all the original factor names in the variables. I get 1,2,3.... Someone would be so kind and tell me if there's is a ny way to get variables in a dataframe, but not changing these factor to numbers? Thank you all. José [[alternative
2011 Oct 14
3
change uppercase variables
 Hello everyone, I'm trying to change the name variables of a big dataset. Here's more than 300 variables. The point is that I have to match it with another dataset that have same variables, but in lowercase, the I can use rbind and do my work. Is there any function for changing uppercase or lowercase variables? Thank you in advance! José [[alternative HTML version deleted]]
2012 Apr 26
1
creating a package?
Dear R users.   I'm trying to know how to create a function. I have developed a big code that use a file and makes many process and then creates a table that is exported as txt. The point is to make something like a function.  I need to make it easy for others, so they can run it. This has a particular name? I will be very gratefull and placed if any of you can provide some lights.
2008 Apr 27
2
R instalation on Ubuntu 7.10
Se ha borrado un texto insertado con un juego de caracteres sin especificar... Nombre: no disponible Url: https://stat.ethz.ch/pipermail/r-help/attachments/20080427/53a3d8c7/attachment.pl
2011 Apr 21
1
numbers and superscripts in the same unit of measurement.
Hola everyone, I'm doing an analisys about abundance of a planctonic specie in Robinson Crusoe Islan and I am having a hard time just adding the superscripts and the 100 (one hundred) in the measure of abundance. Perhaps this is so basic to you, but I need to put the real unit of measure. Individuals / 100 cubic meters. I have been looking in websites and R-list and there is not any
2011 Aug 08
1
Classification trees problem.
Hello Everyone, I'm doing a Classification trees with categorical explanatory variables using library rpart and I would like to do a prediction for some data imputs. I don't know where's a function or how can I do it?. Is there someone can help ?? ¿. Here's the code that I'm using. library(rpart) fit <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis) plot(fit)
2011 Aug 30
3
having trouble extracting week from chron object
Running R 2.13.1 on Windows XP. I would like to get week of the year (1-52) for each date. library(chron) dts <- dates(c("02/27/92", "02/27/92", "01/14/92","02/28/92", "02/01/92")) dts dts.chron <- as.chron(dts) dts.chron class(dts.chron) # all of these component extractions work: months(dts.chron) weekdays(dts.chron) years(dts.chron)
2020 Apr 04
5
Help useRs to use R's own Time/Date objects more efficiently
This is mostly a RFC [but *not* about the many extra packages, please..]: Noticing to my chagrin how my students work in a project, googling for R code and cut'n'pasting stuff together, accumulating this and that package on the way all just for simple daily time series (though with partly missing parts), using chron, zoo, lubridate, ... all for things that are very easy in base R *IF*
2001 Jan 11
3
Reformatting dates using chron
Hello All: I am trying to generate a sequence of dates using library(chron). Using the following code, I got most of what I want, dts <- seq.dates("01/02/1998", "01/10/2001", by="day") dts <- dts[!is.weekend(dts)] a sequence of weekdays only (no weekend dates), with first observation appearing as 01/02/98 and the last 01/10/01. But I would
2010 Dec 30
2
Curso de R en Santiago, Chile. Gratis!
Estimados, A todos quienes estan insterados y estan en Stgo de Chile les tengo una muy buena noticia. Desde hace ya algunas semanas, nos hemos sentado a la mesa con Alex (Epidemiologo) a discutir la necesidad de desarrollar un curso de R para principiantes. No solo porque es necesario unirse en torno a un projecto como es el R, sino que es una oportunidad para muchos cientificos (como
2011 Jul 25
3
Life Cycle Assessment with R.
Hello everyone,  There's something really important about climate change and how many institutions around the globe are looking for softwares solutions in order to achieve they (and everyone) needs to improve life conditions in all the planet. Currently, they're many comercial softwares working with this important topic named as: "Life Cycle Assesment", monitoring carbon emition,
2011 Mar 07
1
Associating the day of week to a daily xts object
I have the following xts objetct "temp" > str(temp) An ?xts? object from 2010-12-26 to 2011-03-05 containing: Data: num [1:70, 1] 2.95 0.852 -0.139 1.347 2.485 ... - attr(*, "dimnames")=List of 2 ..$ : NULL ..$ : chr "t_n" Indexed by objects of class: [POSIXct,POSIXt] TZ: GMT xts Attributes: NULL > temp t_n 2010-12-26
2011 Oct 04
1
joining tables
Hello everyone, I know this is very basic question for you people. I'm working with mani diferent tables, but everyone has the same variables. (V1, V2, V3). The only think that I need to do is to put together this tables. In other words, creating just one big table with all the cases showed in the smaller tables. For example: tabla1<-data.frame(v1,v2,v3) tabla2<-data.frame(v1,v2,v3)
2011 Sep 14
2
Image processing and analysis with R
Hello everyone,  I'm working in a project to create an special analysis about visualization in some animals and its behaviour, through checking eye movement. The point is this is very important to get data from the image as a resume of what this animal sees. I think an RGB histogram like photoshop does, but I need to get the data from this histogram analysis and I was wondering about using R
2012 Mar 19
1
Dotplot: how to change size in the y lab ?
Hi everyone, I'm trying to reduce the font size in the Y  exe in this plot: http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=150 Anyone knows how to do it? I have checked the argument lab.cex and cex, but any of these works! if you want to check us this code: ### read the data d <- read.csv( file( "http://addictedtor.free.fr/graphiques/data/150/data.txt" ) )
2009 Jul 20
1
Problem with as.POSIXct on dates object
Dear R-helpers, I have a problem converting an object made with the 'chron' function to a POSIXct object: # Make date based on DOY dat <- chron(dates=232, origin.=c(month=1, day=1, year=2008)) dat #[1] 08/20/08 # Converting to POSIXct uses current timezone (Sydney): as.POSIXct(dat) #[1] "2008-08-20 10:00:00 EST" # Setting GMT timezone has no effect? as.POSIXct(dat,
2010 Dec 17
3
Alternative to extended recode sintax?
Dear R-users, I have a factor variable within my data frame which I derive week after week from a POSIXct variable using the cut(var,"weeks") command I have found in the chron package. The levels() command gives me: [1] "2009-03-30 00:00:00" "2009-04-06 00:00:00" "2009-04-13 00:00:00" "2009-04-20 00:00:00" "2009-04-27 00:00:00"
2006 Feb 21
3
Number of Days Between Dates: Incorrect Results For Date Calucations.
In some cases, incorrect results are produced by the code below intended to calculate the number of days between 2 dates. The year in question was a leap year. Note the results for 2004-04-04 and 2004-04-05 are the same! They should be 37 and 38 respectively. > as.integer(as.POSIXct("2004-04-02") - as.POSIXct("2004-02-27")) [1] 35 >
2010 Apr 29
1
image function with date-time on X axis
I am trying to plot a image where the x axis has the units of time. When I issue the image(x,y,z) command with x as a POSIXct object, it fails to put a time stamp on the x axis. Instead I get a warning "Incompatible methods" warning and no dates on my x axis. This example shows my problem: Rmat=t(matrix(data=rnorm(1:500),ncol=10,nrow=50)) tax=seq(ISOdate(2010,4,14,12,0,0),
2011 Apr 06
1
Problem to convert date to number
Hi R users, I have a maybe small problem which I cannot solve by myself. I want to convert "chron" "dates" "times" (04/30/06 11:35:00) to a number with as.POSIXct. The Problem is that I can't choose different timezones. I always get "CEST" and not "UTC" what I need. date = as.POSIXct(y,tz="UTC") "2006-04-30 11:35:00