search for: time1

Displaying 20 results from an estimated 98 matches for "time1".

Did you mean: time
2012 Dec 17
3
simplifying code
Dear All,   I was wondering if you could help me with the following: I have the code:   tin <-0.5 tau <-24 output0 <-10 TIMELOW <-tin TIMEHIGH <-1*tau TIME1 <-c(seq(TIMELOW,TIMEHIGH, by = sign(TIMEHIGH-TIMELOW)*(tau-tin)/3))   then I would like to calculate:   cp1 <-output0*exp(-0.3*TIME1[1]) cp2 <-output0*exp(-0.3*TIME1[2]) cp3 <-output0*exp(-0.3*TIME1[3]) cp4 <-output0*exp(-0.3*TIME1[4])   then plot(TIME1,c(cp1,cp2,cp3,cp4))   is ther...
2008 Nov 10
2
as.Data with minutes resolution
Hi, I have a vetor os dates with day and hour:minutes. > time1 <- c("03/08/08-11:00","03/08/08-11:10") > time1 <- as.Date(time1,"%d/%m/%y-%R") > summary(time1) Min. 1st Qu. Median Mean 3rd Qu. Max. "2008-08-03" "2008-08-03" "2008-08-03" "2008-08-03&quot...
2004 Aug 26
2
text() with text, variables and math HOWTO?
...rom the 'abusing R for blotting - particularly anally' department: How can I in the expression below make the '%~~%' show up as the aprrox-sign I want it to be? Thanks for any hint, Joh text( 500,1.5, cex=0.75, substitute( paste( OD[600][~nm], " of 1 at ", time1, " min ", "%~~%", time1h, "h" ), list( time1=round(time1,digits=0), time1h=round(time1/60,digits=1) ) ) )
2008 Apr 09
2
fuzzy merge
Hi, I would like to merge two data frames. It is just that I want the merging to be done with some kind of a fuzzy criterion. Let me explain. My first data frame looks like this : ID1 time1 dt 1 2008-01-02 13:11 10 2 2008-01-02 14:20 20 3 2008-01-02 15:42 30 4 2008-01-02 16:45 40 5...
2007 Jan 19
4
Newbie question: Statistical functions (e.g., mean, sd) in a "transform" statement?
Greetings listeRs - Given a data frame such as times time1 time2 time3 time4 1 70.408543 48.92378 7.399605 95.93050 2 17.231940 27.48530 82.962916 10.20619 3 20.279220 10.33575 66.209290 30.71846 4 NA 53.31993 12.398237 35.65782 5 9.295965 NA 48.929201 NA 6 63.966518 42.16304 1.777342 NA one can use &qu...
2010 Nov 15
3
merge two dataset and replace missing by 0
Hi r users, I have two data sets (X1, X2). For example, time1<-c( 0, 8, 15, 22, 43, 64, 85, 106, 127, 148, 169, 190 ,211 ) outpue1<-c(171 ,164 ,150 ,141 ,109 , 73 , 47 ,26 ,15 ,12 ,6 ,2 ,1 ) X1<-cbind(time1,outpue1) time2<-c( 0 ,8 ,15 , 22 ,43 , 64 ,85 ,106 ,148) output2<-c( 5 ,5 ,4 ,5 ,5 ,4 ,1 ,2 , 1 ) X2&l...
2004 Aug 26
1
how to make lines() meet axis in autoscaled coordinate system?
Hello, I have an auto-scaled coordinate system and would like to add some clarifying lines to the graph - which ares supposed to meet the axis. >lines(c(0,time1,time1), c(1,1,0),lty=3) does what I want, BUT the second leg does not touch the x-axis since the auto-scaling of the y-axis does not start at'0' but slightly negative. I could now adjust the line length by 'trial and error' to suit my needs, but I'd prefer a generalizable solut...
2012 Jan 19
3
Not generating line chart
Hi All, Can you please help me, why this code in not generating line chart? library(ggplot2) par(mfrow=c(1,3)) #qplot(TIME1, BASCHGA, data=Orange1, geom= c("point", "line"), colour= ACTTRT) unique(Orange1$REFID) -> refid for (i in refid) { Orange2 <- Orange1[i == Orange1$REFID, ] pdf('PGA.pdf') qplot(TIME1, BASCHGA, data=Orange2, geom= c("line"), colour= ACTTRT) dev.off() } Re...
2012 Jan 19
1
Legend problem in line charts
..., 2, 2), SUBARM = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ACTTRT = structure(c(3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 1L, 1L, 2L, 2L), .Label = c("ABC", "DEF", "LCD", "Vehicle"), class = "factor"), TIME1 = c(0, 2, 6, 12, 0, 2, 6, 12, 0, 2, 6, 12, 0, 2, 6, 12, 0, 12, 0, 12), ENDPOINT = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = "PGA", class = "factor"), BASCHGA = c(0, -39, -47, -31, 0, -34, -25, -12, 0, -4...
2010 Sep 02
2
date
Hello all, I've 2 strings that representing the start and end values of a date and time. For example, time1 <- c("21/04/2005","23/05/2005","11/04/2005") time2 <- c("15/07/2009", "03/06/2008", "15/10/2005") as.difftime(time1,time2) Time differences in secs [1] NA NA NA attr(,"tzone") [1] "" How can i calculate the diffe...
2010 Jan 12
0
Wishlist: Function 'difftime' to honor 'tzone' attribute (PR#14182)
...fore, it is reasonable if their difference is zero. The result is like above because the function '-.POSIXt' calls the function 'difftime', and function 'difftime' does not honor 'tzone' attribute, as can be seen from this part of the function definition. function (time1, time2, tz = "", units = c("auto", "secs", "mins", "hours", "days", "weeks")) { time1 <- as.POSIXct(time1, tz = tz) time2 <- as.POSIXct(time2, tz = tz) ... } Function 'difftime' calls 'as.POSIXc...
2008 Aug 02
4
RE SHAPE package question.
...ized my data sets so that it is easy for MARK to read it. Basically I have the encounter histories of 1837 butterflies The data looks like this the first 4 columns are the occasions and the last two code for male and female > t1 t2 t3 t4 M F > 1 0 0 0 1 0 male capture on time1 but not seen on time 2, 3 > and 4 > 1 0 0 0 1 0 male capture on time1 but not seen on time 2, 3 > and 4 > 1 0 0 0 0 1 female capture on time1 but not seen on times 2, > 3 and 4 > 1 0 1 1 1 0 male captured on time 1, not seen on time 2, > r...
2010 Jan 16
2
Extracing only Unique Rows based on only 1 Column
...the values in the other four rows, only the uniqueness of the entries in the first row. The "unique" command does not seem to have this option available, at least based on what I've read in the help file. A simplified example matrix (designated as "traveltimes"): ID Time1 Time2 1 3 4 1 4 7 2 3 5 2 5 6 3 4 5 3 2 8 When I use a command such as matches <- unique(traveltimes, incomparables = FALSE, fromLast = FALSE) I will end up with a 6-row matrix, exactly what I already have. What I would like to do is to remove the d...
2011 Jul 19
1
Measuring and comparing .C and .Call overhead
...2) - round(tC_c,2))/N, "usec\n") dyn.unload("mvMultiply.so") -------------------------------- #code file: myMultiply.cc #include <Rinternals.h> #include <R.h> #include &lt;sys/time.h&gt; extern "C" { SEXP matvecMultiply(SEXP A, SEXP x) { timeval time1, time2; gettimeofday(&time1, NULL); SEXP execTime_sxp; PROTECT(execTime_sxp = allocVector(REALSXP, 1)); double *execTime; execTime = REAL(execTime_sxp); double *rA = REAL(A), *rx = REAL(x), *ry; int n = length(x); int m = length(A) / n; SEXP y; PROTECT(y = allocVector(REALSXP, m)); ry...
2011 May 01
1
Mean/SD of Each Position in Table
I have 100+ .csv files which have the basic format: > test X Substance1 Substance2 Substance3 Substance4 Substance5 1 Time1 10 0 0 0 0 2 Time2 9 5 0 0 0 3 Time3 8 10 1 0 0 4 Time4 7 20 2 1 0 5 Time5 6 25 3...
2007 Dec 16
4
improving a bar graph
...the colour value so that each person has a different colour, which recurs across each of the three graphs/tie epriods? (b) I have seen much more sophisticated examples using lattice (e.g each person has a separate panel/plot). I am open to alternative code as to how I could present this data. Time1 <- c(9.0,6.0,1.0,5.0,7.0,9.0,5.0,7.5,6.0,8.0,5.0,5.0,9.0,4.0,5.0,5.0) Time2 <- c (10,5,3,3,3,6,7,8,5,8,7,7,9,8,5,3) Time3 <- c (10,0,3,0,0,6,0,0,0,0,0,0,0,0,0,0) df <- rbind (Time1, Time2, Time3) dft <- (t(df)) dft barplot(dft, beside = TRUE, main= "Risk score by assessment&qu...
2012 Dec 13
1
duplicated.data.frame() and POSIXct with DST shift
...duplicated could be helpful. It is mentioned how duplicated.data.frame() works, but I didn't find a hint to properly handle POSIXct-objects. My particular problem was to cast a data.frame like this one with cast() (which calls reshape1(), which calls duplicated()): df2 <- data.frame(time, time1=as.numeric(time), lab=rep(1:3, each=2), value=101:106, text=rep(c("foo", "bar"), each=3)) library(reshape2) Using the column of class POSIXct as a variable in the formula gives: cast(lab*time~text, data=df2, value="value") Aggrega...
2012 Oct 23
2
plotting multiple variables in 1 bar graph
...ta set: I have 6 sites, each measured 5 times over the past year. During each sampling time, I counted the occurrences of different benthic components (coral, dead coral, sand, etc.) over 5 transects in each site site time transect coral deadcoral sand rubble ..... S1 time1 trans1 10 15 10 4 S1 time1 trans2 5 4 10 6 S1 time1 trans3 10 2 5 7 . . . S5 time5 trans5 6 3 1...
2004 Aug 05
1
Post-hoc t-tests in 2-way repeated measure ANOVA
Hi all I am running a 2-way repeated measure anova with 1 between-subjects factor (Group=treatment, control), and 1 within-subject factor (Time of measurement: time1, time2). I extract the results of the anova with: summary(aov(effect ~ Group*Time + Error=Subj/Time, data=mydata)) Now, this must be clearly a dumb question, but how can I quickly extract in R all the post-hoc t-tests for the simple main effects? Also, while I am at it, how do I enter in the m...
2013 Apr 18
2
trouble with write.foreign
...and I got an error message: Error in if (varnames[v] != names(varnames)[v]) cat("LABEL ", varnames[v], : argument is of length zero I do not want any variable names at all I just want the data in a text file with 8 columns and 10000 rows. The code I used was: write.foreign(T1, "time1.txt", "time1.sas", package="SAS"). Is there any way in which I can write the matrix as is in a text (or csv) file without having any variable names? -- View this message in context: http://r.789695.n4.nabble.com/trouble-with-write-foreign-tp4664654.html Sent from the...