search for: day1

Displaying 20 results from an estimated 30 matches for "day1".

Did you mean: day
2010 May 26
0
substitution in a function
I have the following function defined as below match.trace <- function(dfobj, distance, day1, day2) { day1 <- substitute(dfobj$day1); day1 day2 <- substitute(dfobj$day2) distance <- substitute(dfobj$distance) xx <- NULL for (i in 0:10) xx[i+1] <- with(dfobj, cor(Lag((day1-day1[1]),i), (day2-day2[1]), use='pair')) i <- match(max(xx), xx) with(dfobj...
2001 Oct 26
3
question about anova() output
...order of the factors in the fitted model object, and this has me baffled. I see this dependency with the data.frame below but not with an example (table 6.4) from Montgomery's DOE book. This is with R 1.3.0 on Debian GNU-Linux. Where have I gone wrong? > centerpts run sample CH50mg 1 day1 dev126 0.56 2 day1 dev126 0.70 3 day1 dev126 0.82 4 day1 dev126 0.72 5 day2 dev126 0.57 6 day2 dev126 0.60 7 day3 dev126 0.61 8 day3 dev126 0.64 9 day3 dev126 0.68 10 day3 dev126 0.68 11 day1 dev118 0.77 12 day1 dev118 0.80 13 day1 dev118 0.86 14 day2 dev118 0.71...
2006 May 07
1
Anyone care for a braindump?
...", self.id, self.child_id, self.startdate, self.enddate]) @days_inside_new_day.collect {|d| d.destroy} # Split days that have startdate <= self.startdate and enddate >= self.enddate # # before after # |==| # |---------| |---|==|--| # @day1 = Day.find(:all, :conditions => [ "id != ? and child_id = ? and startdate <= ? and enddate >= ?", self.id, self.child_id, self.startdate, self.enddate])[0] if (@day1) @day2 = @day1.clone if (@day1.startdate < self.startdate) @day1.enddate = self.star...
2007 Apr 19
4
general question about plotting multiple regression results
Hi all, I have been bumbling around with r for years now and still havent come up with a solution for plotting reliable graphs of relationships from a linear regression. Here is an example illustrating my problem 1.I do a linear regression as follows summary(lm(n.day13~n.day1+ffemale.yell+fmale.yell+fmale.chroma,data=surv)) which gives some nice sig. results Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -0.73917 0.43742 -1.690 0.093069 . n.day1 1.00460 0.05369 18.711 < 2e-16 *** ffemale.yell 0.22419 0.06...
2008 Jul 31
2
S 3 generic method consistency warning please help
I would like to include this in a package. The S3 methods on R CMD check says * checking S3 generic/method consistency ... WARNING window: function(x, ...) window.chron: function(data, day1, hour1, day2, hour2, ...) See section 'Generic functions and methods' of the 'Writing R Extensions' manual. I have looked and can not figure it out. This function is for convience. What can I do to fix this? This is the first time I have tried this, so be easy, and explain it to...
2009 Jan 21
1
finding row and column indices of date in multiple columns of a data frame
Hi, I have a data.frame SAMPLES with columns: Site Site# Season Day1 Day2 Day3 Day1, Day2, Day3 are class "Date", the other columns are numeric or factor. I have a date "mydate" that may or may not be listed in my data.frame and I need to find that out. If "mydate" is there, I want to get the number of the data.frame row whe...
2002 Nov 01
1
Reshape function
Can someone help me with the proper usage of the reshape function? Let's say I have a dataset with columns like this (wide format): Id Sex Group Test Day1 Day 2 Day 3... And I want to transpose this into something like this (thin): Id Sex Group Test Time Where the new column labeled time contains all the time variables (Day 1, Day 2, Day 3...) that were in the wide format. I just cannot get it to work right using the reshape fun...
2013 Jan 17
1
plotting from dataframes
...lp I am closer to solving my problem but I have some small problem. So let's say I start with >data number day hour 1 17 10 2 17 11 3 17 6 4 18 4 5 18 10 6 19 8 7 19 8 I want to split to odd days, which I am able to do, I call this object frames, which looks like: > frames $`1` c1 day1 hour1 1 1 17 10 2 2 17 11 3 3 17 6 $`2` c1 day1 hour1 4 6 19 8 5 7 19 8 Now I want to make plot of the hours of both days, but not by hand. I need some sort of loop for this. How is this done? So par(mfrow=c(1,2)) for(?) plot(?hours?) thanks for the help --...
2009 Sep 11
1
help with plotting
...lity.analysis\\urine\\mz.spot.sam.dat.new", header = TRUE ) pvalue = read.table("Z:\\bruce.9.3.09.sample.stability.analysis\\urine\\all.urine.features.t.test.result", header = TRUE ) library(compositions) p = function(a,b){ y = pvalue[,a] if(y<0.01){ index = which(y, arr.ind=TRUE) day1 = raw_urine[index,3:7] day2 = raw_urine[index,b] graph = {matplot(raw_urine[index,1],day1,lwd = 3) matpoints(raw_urine[index,1],day2,lwd = 3, col="red")} print(graph) }} the above is my sample code in which i'm trying to output some graphs. but however, I can get return() to return v...
2010 May 21
4
indexing problem
...all functions Pos100415,Pos100416,Trad100415...are all data frames I have one dataframe each day. For example, Pos100415 is "Pos" for day 15/04/2010. Now I need to access data.frames in my environment for a function, according to this following scheme: Pos100415 and Pos100416 (i.e. Pos(day1) and Pos(day2)), and Trad100416 (i.e. trad(day2)). I have absolutely no idea how to deal with this indexing problem in a generic manner. Note that all numbers will belong to the list "select". Not sur to be clear enough, but any help would be appreciated. TY
2011 Nov 01
1
Counting entries to create a new table
...s should be fairly simple, but I can't quite figure it out and I must not be using the right words when I search for answers. I have a dataset with a number of individuals and observations for each day (7 possible codes plus missing data) So it looks something like this Individual A, B, C, D Day1 1,1,1,1 Day 2 1,3,4,2 Day3 3,,6,4 (I've also tried transposing it so that individuals are rows and days are columns) I want to summarize the total observation codes by individual so that I end up with a table something like this: ,  1, 2 ,3 ,4, 5, 6,7, missing A  2,0,1,0,0,0,0,0 B  1,0,1,0,0,...
2008 Feb 18
2
R graphics question: "binary" bar chart
...ay in a hospital should be illustrated with a dark colour a if there is a stay at home between 2 hopital stays, it should be illustrated with a bright colour. e.g. P1 |//////| |///| |////////| P2 |//////////| P3 |//| |////| |///| |//| Day1------------Day100---------------------------------Day365 legend: Px Patient with id x |///| Hospital stay (length of bar symbolizes length of stay) Place between 2 hospital stays symbolizes stay at home (not in hospital) Are there any package which can do that? If not, how can I...
2006 Sep 14
2
ANOVA in R
...over the three days. In other stats packages I have used, I can just select this data and run the ANOVA function and get the F and p values. However in R, the anova function seems to only work with a fitted model, eg. Linear regression. This function seems to assume there is a relationship such as day1~ day 4 + day 8, but in my case there isn't - I just want to perform an ANOVA without regression. If anyone could point me in the right direction I'd greatly appreciate it, Thanks [[alternative HTML version deleted]]
2012 Nov 01
2
Name assignment in for loop
...yntax. The use of dat and dat2 is not an error. I'm pulling data from 2 sources for the model. for (i in 1:dim(dat2)[[1]]) { assign("modelb",i) <- lm(log(dat$flux) ~ dat$Tsoil_flux, subset = dat$chamber == dat2$chamber[i] & dat$year == dat2$year[i] & dat$doy >= dat2$day1[i] & dat$doy <= dat2$day2[i]) dat2$coef[i] <- coef(assign("modelb",i, sep = ""))[[2]] dat2$Rsq[i] <- summary(assign("modelb",i, sep = ""))[[9]] } I have also tried assign("modelb",1:i) #following the ?assign example paste("modelb&...
2007 Aug 17
1
finding the row(s) for a date in a data frame
Hi, If I have a data frame A with the following format: Day1 Day2 Day3 Day4 1 1979-11-02 1979-11-03 1979-11-04 <NA> 2 1979-12-06 <NA> <NA> <NA> 3 1979-12-13 1979-12-14 1979-12-15 1979-12-16 4 1979-12-20 <NA> <NA> <NA> And a date &q...
2008 Jul 22
0
loop for multiple regressions
Dear all, I have the following data in excel: day1 y 1 2 3 2 3 x1 0.2 0.3 0.4 0.3 0.2 x2 7 3.4 2 8 6 day2 y 2 4 3 2 2 x1 0.4 0.5 0.3 0.3 0.2 x2 7 8 9.1 6 5 I have the following problems: first of all, when I ask R to read the file (with the package xlsReadWrite and the command read.xls) it has a problem with the fact that the left most corner...
2011 Dec 06
1
Writing out in loops
I would like to write some data to different files. I can create the filename Day1.txt like this: filen <- paste("Day", l, ".txt", sep="") and then I'm using a For loop to write out one row of a matrix, something like this: For (j in 1:10) { cat(mat[1,j], ",", file=filen, append=TRUE) } cat("\n", file=filen, append=TRU...
2015 Jan 29
2
any valid up-to-date info about Kamailio-Asterisk integration ?
Hi all Have recently watched Matt Jordan's session on Kamailio World 2014 On slides 26-29 of his presentation (http://www.kamailio.org/events/2014-KamailioWorld/day1/09-Matt.Jordan-Asterisk12-And-PJSIP.pdf) he speaks about a (completely new, for me at least) approach to build scalable telephony systems, using N instances of Kamailio and N instances of Asterisk Are there any whitepapers, howtos, "implementation experience reports", whatever, avail...
2019 Jul 27
3
[PATCH libnbd] lib: Use symbol versions.
This patch adds support for symbol versions. It is based on what libvirt does. The generated syms file looks like: LIBNBD_1.0 { global: nbd_...; nbd_...; local: *; }; In a future stable 1.2 release, new symbols would go into a new section which would look like this: LIBNBD_1.2 { global: nbd_new_symbol; nbd_another_new_symbol; local: *; } LIBNBD_1.0; In my testing the
2009 Jun 01
1
Reshaping Data
Hi, i did a mistake with my first post. I have to reshape data from this matrix: id x1 x2 x3 x4 day1 day2 day3 day4 day5 day6 day7 day8 day9 1 0.129 0.797 0.231 0.615 4 4 1 1 1 1 3 3 3 2 0.420 0.376 0.501 0.282 4 4 4 4 5 4 2 5 5 3 0.377 0.486 0.897 0.699 4 4 4...