search for: adele_thompson

Displaying 14 results from an estimated 14 matches for "adele_thompson".

2011 May 09
2
Round down to earliest hour or half hour
I have times and would like to round down to the earliest 30 minute increment. For instance, a time of 2011-04-28 09:02:00 (the as.numeric value = 1303999320) I would like it to be rounded down to: 2011-04-28 09:00:00 (the as.numeric value = 1303999200) Any ideas of how to do this? ----- In theory, practice and theory are the same. In practice, they are not - Albert Einstein -- View this
2011 May 12
3
assigning creating missing rows and values
I have a dataset where I have missing times (11:00 and 16:00). I would like the outputs to include the missing time so that the final time vector looks like "realt" and has the previous time's value. Ex. If meas at time 15:30 is 0.45, then the meas for time 16:00 will also be 0.45. meas are the measurements and times are the times at which they were taken. meas<-runif(18)
2011 May 05
6
Averaging uneven measurements by time with uneven numbers of measurements
I have a new device that takes measurements anywhere from every second, to every 15 minutes (depending on changes). The matrix has a date, time and Y column (Y is the measurement). For three days it is 25,000 rows. How do I average the measurements by every 30 minutes so my matrix is 48 rows per day? I have been working on this and cannot figure out a simple method. Any ideas? Thank you. ----- In
2006 Jul 18
4
How can I extract information from list which class is nls
Hello! I work with : R : Copyright 2006, The R Foundation for Statistical Computing Version 2.3.1 (2006-06-01) On Windows XP Professional (Version 2002) SP2. At this moment I use the function "nls" combined with a selfStar model (SSmicmen, related to Michaelis-Menten equation, and provided by the "stats" package). When I realise the following operation (cf. p 59 of the
2011 May 12
1
separate date and time
I have a combined date and time. I would like to separate them out into two columns so I can do things such as take the mean by time across all dates. meas<-runif(435) nTime<-seq(1303975800, 1304757000, 1800) nDateT<-as.POSIXct(nTime, origin="1970-01-01") mat1<-cbind(nDateT,meas) means1<- aggregate(mat1$meas, list(nDateT), mean) This doesn't do anything as each day
2011 Oct 26
6
sometimes removing NAs from code
Sometimes I have NA values within specific columns of a dataframe (in this example, the first two columns can have NAs). If there are NA values, I would like them to be removed. I have been using the code: y<-c(NA,5,4,2,5,6,NA) z<-c(NA,3,4,NA,1,3,7) x<-1:7 adata<-data.frame(y,z,x) adata<-adata[-which(apply(adata[,1:2],1,function(x)any(is.na(x)))),] This works well if there are NA
2011 Nov 03
1
For loop to cycle through datasets of differing lengths
I have encountered this problem on several occasions and am not sure how to handle it. I use for-loops to cycle through datasets. When each dataset is of equal length, it works fine as I can combine the datasets and have each loop pick up a different column, but when the datasets are differing lengths, I am struggling. Here is an example: A<-1:10 B<-1:15 C<-1:18
2011 Feb 28
3
nls not solving
I am running the following nls equation. I tried it with data that excel was fitting and got the error: singular gradient matrix at initial parameter estimates I thought it was due to a low number of points (6), but when I create a dataset, I get the same problem. If I remove the parameter "a," then it can find a solution. Does anyone know what I can do to fit this model?
2011 Feb 08
2
Plot where points are treatment letter
I would like to create a plot of y vs x with different treatments where the points are actually the letter of the treatment. Here is the code: A<-as.matrix(rnorm(10,10)) B<-as.matrix(rnorm(10,9.5)) C<-as.matrix(rnorm(10,10.5)) Y<-as.matrix(rnorm(30,13)) X<-rbind(A,B,C) nA<-matrix("A",10,1) nB<-matrix("B",10,1) nC<-matrix("C",10,1)
2011 Oct 21
0
nls making R "not responding"
Here is the code I am running: library(nls2) modeltest<- function(A,mu,l,b,thour){ out<-vector(length=length(thour)) for (i in 1:length(thour)) { out[i]<-b+A/(1+exp(4*mu/A*(l-thour[i])+2)) } return(out) } A=1.3 mu=.22 l = 15 b = .07 thour = 1:25 Yvals<-modeltest(A,mu,l,b,thour)-.125+runif(25)/4 st2 <- expand.grid(A = seq(0.1, 1.6,.5), mu = seq(0.01, .41,.1), l=1, b =seq(0,.6,.3))
2011 May 13
1
Plots: I've deleted axes, now to delete space
I am plotting 28 plots on one screen: par(mfrow=c(4,7)) for (i in 1:28) { a<-seq(1,3,1) plot(a,a, ann=FALSE) } I want a main title for all the plots (I tried using main but that doesn't work). I deleted the axes, but am not sure how to delete the space. There are such large margins between plots so the plots themselves are very small. If I delete the margins I can leave them all on one
2011 May 10
2
need to delete by time, not date
I have a matrix where one column has a date and another column has a time. I need to delete all times before 6am. I had combined the Date and Time column into DateTime. Mat1: Weight Date Time 7.6 04/28/11 09:03 8.4 04/29/11 03:11 8.6 04/29/11 05:32 8.6 04/29/11 09:53 1.4 05/01/11 19:52 I tried just picking up the time: as.POSIXct(Mat1$Time, format = "%H:%M") but
2011 Sep 12
6
barplot in hexagram layout
dev.new(width=6, height=1.5,mar=c(0,0,0,0)) par(mfrow=c(1,1),mar=c(.5, .5, 1.5, .5), oma=c(.4, 0,.5, 0)) barplot(c(1,1,1,1,1,1),col=c("blue","purple","red","green","orange","yellow"), axes = FALSE) I have a barplot that returns six colors in a line. I would like to get the same six color blocks in a hexagram layout (if it were a clock,
2011 Apr 18
3
Power Analysis
I am trying to do a power analysis to get the number of replicas per treatment. If I try to get the power it works just fine: setn=c(2,3) sdx=c(1.19,4.35) power.t.test(n = setn, delta = 13.5, sd = sdx, sig.level = 0.05,power = NULL) If I go the other way to obtain the "n" I have problems. sdx=c(1.19,4.35) pow=c(.8,.8) power.t.test(n = NULL, delta = 13.5, sd = sdx, sig.level = 0.05,