similar to: Date Calculation

Displaying 20 results from an estimated 10000 matches similar to: "Date Calculation"

2003 Nov 26
4
strptime Usage
Hi, I have a column in a dataframe in the form of: > as.vector(SLDATX[1:20]) [1] "1/6/1986" "1/17/1986" "2/2/1986" "2/4/1986" "2/4/1986" [6] "2/21/1986" "3/6/1986" "3/25/1986" "4/6/1986" "4/10/1986" [11] "4/23/1986" "4/30/1986" "5/8/1986"
2004 Feb 26
3
Collapsing Categorical Variables
Hi, Suppose I have a categorical variable called STREET, and I have 30 levels for it (i.e. 30 different streets). I want to find all those streets with only 15 observations or below then collapse them into a level called OTHER. Is there a quick way, other than using a for() loop, to do it? Currently what I'm doing is something like: ### Collapse STREET (those < 15) st <- c()
2004 Feb 27
2
a loop question
I want to get three .gif image files test.1.gif, test.2.gif, & test.3.gif by using a loop. The code I tried is like this: x=c(0, 1, 2, 3, 4) y=c(1, 2, 3, 4) for(i in 1:3) { x11() jpeg("test.i.gif") plot(x, y) dev.off() } but I only could get one image file, test.i.gif. How can I get three image files? Thanks.
2002 Oct 01
1
Cleveland's Cut-and-Stack Plot
Hi, Is there a function in R that does Cleveland's Cut-and-Stack plot (Page 190 -- 191, The Elements of Graphing Data, William S. Cleveland)? Or do I need to do it the hard way, i.e. set par(mfrow = c(m, n)) then do it one-by-one? (I have a time series data set that is almost identical to the description in Cleveland's book, hence I'm interested in trying the Cut-and-Stack plot)
2004 Mar 08
3
Decision Trees
I am familiar with the rpart and tree packages for classification and regression trees. However, quite a bit of the research in the transportation community relating to decision trees uses the C4.5 family of algorithms by Quinlan. Are there any plans to make a C4.5 (or a derivative of it) available to R? If not, then I might use the WEKA Java package ( http://www.cs.waikato.ac.nz/ml/weka) that
2004 Feb 16
4
plot
Hi, How could I plot two vectors on the same graph? For example, if I have two lists of results, each list is a vector. I want to display them on the same graph, so I can compare them. How could I do that? Regards, Justin
2003 Dec 15
3
Julian Dates
Hi, I'm a bit confused how julian() works. If I understand right, it returns the number of days since the origin. I have a vector: > SLDATX[1:10] [1] "1986-01-06" "1986-01-17" "1986-02-02" "1986-02-04" [5] "1986-02-04" "1986-02-21" "1986-03-06" "1986-03-25" [9] "1986-04-06"
2004 Feb 09
10
PhD student reading list, suggestions wanted
I've got a PhD student starting this year. She'll be working on data mining. She has asked for a reading list while she's still in her home country, which is a really good sign. Her cosupervisor and I don't (think we) have any problem with choosing things that are specifically about data mining, but there are some statistical ideas (sampling, exploratory-vs-confirmatory,
2004 Feb 16
2
problem for installing package
Hello I would like to install a package on R (splancs package) after downloading them what is the step for implementing them in my library? Thank you. --------------------------------- [[alternative HTML version deleted]]
2004 Apr 15
1
I do not achieve to install some packages
I can't load the packages locfit, lokern and quantreg. When I try to load the 3 packages the R program says that the pakages are not properly installed. He says to see the note in ?library. I think that the error is because there is no built field in the 3 packages. What can I do to make the packages run. My OS is Windows XP. Thank you Rui Martins
2004 Jun 21
2
setwd problems
Hello, I am using R for Windows and I receive error messages when trying to change my working directory: > setwd('C:\BACC_R') Error in setwd(dir) : cannot change working directory I would really appreciate your help, Joan Serra
2004 May 15
1
how to get data and post it on R
Hi , i'm having trouble getting data from outside and trying to do either a discrimination analysis or a regression analysis.I don't know what kind of data i need to use and also what are the packages i need to use. Please get me some direction so i can begin . __________________________________
2010 Oct 29
7
date calculation
Hi list, Could someone explain to me why the following result is not a integer? > difftime(strptime("24NOV2004", format="%d%b%Y"), strptime("13MAY2004", >format="%d%b%Y"), units="days") Time difference of 195.0417 days I'm using R2.12.0 on WinXP. Thanks! ...Tao
2003 Mar 26
2
ifelse()
Hi, I'm not sure if this can be done but.. I know that with ifelse() I can do something like: ifelse(x <= 3, 1, 2) to go through each element in my vector x, and if x_i <= 3 substitute the number with 1 else with 2. Essentially I'll get a vector with 2 levels. Can I tweak it so I can get 3-levels? For example: if(x <= 3) then 1 elseif(3 < x <= 4) then 2
2003 Mar 26
2
Plotting K-M Curve when have several strata
Hi, If I have: foo <- survfit(y ~ x) where y is a survival object and x is a n-level factor. The documentation says when I plot(foo), the confidence intervals will not be plotted (which I guess is understandable as otherwise the plot will get really messy). I tried to plot with confidence intervals by using: plot(foo, conf.int = TRUE) and indeed the resulting plot is messy. However
2004 Feb 05
2
I am totally lost on how to install R . . .
First . . . SUBSCRIBE (I want to subscribe to the list). Second, I am trying to install R on windows XP. In looking at the instruction manual I get the following: The simplest way is to use 'rw1081.exe' or 'miniR.exe'. Just double-click on the icon and follow the instructions. If you installed R this way you can uninstall it from the Control Panel. How do I get the
2011 Jul 06
1
trouble parsing a date using strptime()
Hi, I am having a trouble parsing dates using strptime() that I get in the format of year and week number. The data looks like this "201127" which means year 2011 and week 27. I would like to graph this using ggplot but then I get a gap between 201054 and 201101 so I thought I would just easily convert it. I tried to use strptime and as.Date and the format string of %Y%W but it seems
2004 Jun 03
5
cameraa rotation graphics
Dear all, Is there a camera rotation for 3d graphics in R. I have seen it in a conference one time and thought it is pretty neat. the presenter was able to rotate the 3d graph with dragging the mouse up down left right. If not in R is there something that is open source that does this. Thank you Jean Eid
2003 Apr 04
3
Sampling from a Data Frame
Hi, I've been looking through the documentation for sample(), but can only get it to work with vectors. Is it possible to sample from a dataframe? -- Cheers, Kevin ------------------------------------------------------------------------------ /* Time is the greatest teacher, unfortunately it kills its students */ -- Ko-Kang Kevin Wang Master of Science (MSc) Student SLC Tutor and Lab
2003 May 25
1
Example Data Set(s) for nnet, rpart
Hi, I'm doing a presentation on Neural Networks and Tree-Based Models in two weeks, at the moment I'm looking for a data set to use in the presentation. What I would like to use is a good old data, like the Iris data, that is already known by every statisticians. MASS4 uses the cpus data in Chapter 8.10 and the Cushing's syndrome in Chapter 12.4. These two data sets plus the