similar to: R treating time

Displaying 20 results from an estimated 2000 matches similar to: "R treating time"

2010 Apr 23
4
Remove duplicated rows
Hi all, I have a dataset similar to the following Name Date Value A 1/01/2000 4 A 2/01/2000 4 A 3/01/2000 5 A 4/01/2000 4 A 5/01/2000 1 B 6/01/2000 2 B 7/01/2000 1 B 8/01/2000 1 I would like R to remove duplicates based on column 1 and 3 only. In addition, I would like R to remove duplicates based on the underlying and overlying row only. For example, for A, I would like to remove row 2 only
2010 Jan 08
2
R exponential regression
Hi all, I have a dataset which consists of 2 columns. I'd like to plot them on a x-y scatter plot and fit an exponential trendline. I'd like R to determine the equation for the trendline and display it on the graph. Since I am new to R (and statistics), any advice on how to achieve this will be greatly appreciated. Many thanks, Chris -- View this message in context:
2010 Apr 20
3
Words appear to be bolded in the PDF output
Hi all, I have written a note near each of my graphs using mtext. mtext(text,side=1,line=4,cex=0.5,adj=0) Then I have exported the graphs as a PDF file. pdf(file=name,paper='a4',width=7.27,height=10.69) The mtext appears OK in R. But it looks like it is bolded in the PDF file. http://n4.nabble.com/file/n2016971/graph.png I am not sure if this is actually my monitor/computer's
2010 Feb 16
3
converting character vector "hh:mm" to chron or strptime 24 clock time vectors
Hi All, I am attempting to work with some data from loggers. I have read in a .csv exported from MS Access that already has my dates and times (in 24 clock format), (with StringsAsFactors=FALSE). > head(tdata) LogData date time 1 77.16 2008/04/24 02:00 2 61.78 2008/04/24 04:00 3 75.44 2008/04/24 06:00 4 89.43 2008/04/24
2010 Apr 18
3
Exporting PDF
Hi everyone, I have written a script which exports my graphs as a PDF file using the function pdf(). For instance, I run the script and it exports a PDF called "version 1". Then, I have got a new dataset and want to run the script again. What it usually does is overwriting "version 1". But I want it to check if "version 1" already exists. If so, then I want the new
2000 Feb 11
1
new chron problems in RW0990
Dear all, In RW0901 I could > dates("01/01/2000") [1] 01/01/100 where only the printing was wrong, but the double numeric representation of the chron object was calculated correctly but now in RW0990 > dates("01/01/2000") Error in fun(yy, ...) : must be 2-digit (numeric) year specification and also the followig doesn't help > dates("01/01/2000",
2000 Feb 16
1
chron and mysql
R 0.90.1 chron 2.2-2 MySQL 3.22.30 Attempts to create a chron object fail when using date and time data from a mysql database. It appears that chron does not like 4 digit years. Is this the problem? my data look like: > c.time[1:10,] Date Time 1 2000-02-14 10:15:02 2 2000-02-14 10:17:03 3 2000-02-14 10:18:03 4 2000-02-14 10:19:03 5 2000-02-14 10:20:04 6 2000-02-14
2009 Sep 14
3
Exporting Numerous Graphs
Hi all, I have got 27 graphs to export (not a lot...I know!). How can I fit all of them into a single file like PNG without adjusting the size of the graphs? What's in my mind is like pasting graphs into Word, in which I can just scroll down to view the graphs. Thanks for your attention. Much appreciated. Chris -- View this message in context:
2009 Sep 15
2
How to calculate min of a dataset that contains empty column
Hi all, I have got a dataset like the following: a b c 1 5 2 3 7 I am taking the minimum of each column and use it as the minimum of the y-axis of my graphs. My scripts (simplified version) are like the following: f<-array f[1]=a f[2]=b f[3]=c for i in 1:3 name=f[i] ymin<-min(dataset$f[i]) plot(x,y,ylim=c(ymin,100)) The script stops at b, because the min function returns inf
2010 Jan 11
0
Exponential regression
There are a couple of points to keep in mind when doing a log-transform of an exponential model, such as -- y = a*exp(b*x) 1. The implicit statistical model is multiplicative in the error. The implied statistical model of the log transform is -- log(y) = log(a) + b*x + u which implies -- y = a*exp(b*x)*exp(u) A linear regression in the log
2009 Sep 14
3
Question about Factors
Hi all, I am new to R and I have got a question in regards to factors. Say I have a simple dataset like the following: Name Time Value a 1:00 1.25 a 2:00 1.26 b 1:00 1.29 b 2:00 1.28 c 1:00 1.21 c 1:30 1.20 c 2:00 1.23 I want to write a script that automatically plot value against time for a, b and c.
2005 Feb 25
4
read.table
I have a commonly recurring problem and wondered if folks would share tips. I routinely get tab-delimited text files that I need to read in. In very many cases, I get: > a <- read.table('junk.txt.txt',header=T,skip=10,sep="\t") Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, : line 67 did not have 88 elements I am typically able to go
2012 Aug 27
3
String Handling() for Split a word by a letter
Hi, here im unable to run a string handle function called unpaste(). for eg:- a<- "12345_mydata" Actually my requirement what is i need to get , only 12345. Means that , i need the all letter as a word which is before of first " _ " - symbol of "a". i tried to do with unpaste, it says function not found. After that i tried with "strsplit() ". it
2007 Mar 10
2
read a irregular text file data into dataframe()
I am using R2.4.1 calling a text file contains the following data structure: when i call the file into R using tData<-read.table("c:\\test.txt") it gave me Error saying, irregular column in the data set however i need to use the below type of data Is there any alternative in R? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0010 0028 0061 0088 0010 0042 0084 0004 0010 0055 0010 0018 0040 0042
2001 Oct 03
8
Several R vs S-Plus issues
Hi, all, I've been converting code from S-Plus ("S" for short) to R for a few weeks. Here are some differences I've found, aside from the big well-known ones (scoping, models, data storage) and the contents of Kurt Hornik's FAQ section 3.3.3. Let me start with the ones that seem like serious bugs or deficiencies: 1) LETTERS[c(NA,2)] in S is
2001 Oct 03
8
Several R vs S-Plus issues
Hi, all, I've been converting code from S-Plus ("S" for short) to R for a few weeks. Here are some differences I've found, aside from the big well-known ones (scoping, models, data storage) and the contents of Kurt Hornik's FAQ section 3.3.3. Let me start with the ones that seem like serious bugs or deficiencies: 1) LETTERS[c(NA,2)] in S is
2005 Aug 26
2
Unpaste Problem
Hello, Easy ways to "unpaste"? xp <- paste(x2, x3) # x2, x3 are two non-numeric columns. ............. ......................... xfg <- data.frame(xp,sc1, sc2, sc3) # sc1,sc2, sc3 are numeric cols. I want xp to be split up to form a new dataframe of the form (x3, sc1, sc2, sc3). IMPORTANT info : elements of xp have the form abc<space>efg, with abc in x2 and efg in
2010 Apr 21
3
User inputs
Hi everyone, I have been searching for answers for the following questions but I don't have much success. The following questions may actually be quite simple. Any help would be greatly appreciated. (1) I have written a script which requires user input. I am using the readline() command.However, everytime when I run the script, R does not wait for the user input and proceed to the next line.
2007 Apr 20
2
sorting data in R
hello, I'd like know how to sort a data frame in R for example how I should do to sort by Catholic with swiss data frame like below thanks Fertility Agriculture Examination Education Catholic Infant.Mortality Courtelary 80.2 17.0 15 12 9.96 22.2 Delemont 83.1 45.1 6 9 84.84 22.2
1999 May 29
2
Unexpected behaviour of read.table
When reading comma-delimited files as saved from a spreadsheet (unfortunately many of my scientific collaborators give me these) in read.table(), missing values are spotted most of the time. Unfortunately when comma is the first character on the line it gets it wrong. For example, reading the file 1,,3 ,5,6 ,8,9 with read.table("test.dat", header=F, sep=",") R gives