similar to: date in plot, can't add regression line

Displaying 20 results from an estimated 100 matches similar to: "date in plot, can't add regression line"

2019 Mar 06
1
as.Date(Inf) displays as 'NA' but is actually 'Inf'
>>>>> Gabriel Becker >>>>> on Tue, 5 Mar 2019 22:01:37 -0800 writes: > On Tue, Mar 5, 2019 at 9:54 PM Richard White <w at rwhite.no> wrote: >> Hi Gabriel, >> >> The point is that it *visually* displays as NA, but is.na() still >> responds as FALSE. >> >> When I (and I am sure many people)
2005 Jul 28
3
Help troubleshooting save
I done plenty of saves before in rails, but I must be missing something simple with this. Can a fresh set of eyes take a look at this and see why it is not saving: def addcash(uid) c = Trade.new c.attributes = {"user_id" => uid, "tradetype" => ''9'', "cash" => 10000} breakpoint if
2005 Feb 24
4
r: functions
hi all i have a function that uses two inputs, say xdata and ydata. An example is the following, simple1<-function(xdata,ydata) { ofit<-lm(ydata~xdata) list(ofit) } say i use arbitray number for xdata and ydata such that D = x1 x2 y 1 1 10 2 6 6 3 10 7 x<-D[,1:2] and y<-D[,3] if one uses these inputs and rund the program we get the following: >simple(xdata=x,ydata=y)
2019 Mar 06
2
as.Date(Inf) displays as 'NA' but is actually 'Inf'
Hi Gabriel, The point is that it *visually* displays as NA, but is.na() still responds as FALSE. When I (and I am sure many people) see an NA, we then use is.na(). If we see Inf displayed, we then use is.infinite(). With as.Date() this breaks down. I'm not arguing that as.Date(Inf) should be coerced to NA. I'm arguing that as.Date(Inf) should be *visually* displayed as Inf (i.e. the
2008 Jun 24
2
persp plot
I have a set of data in the form x1, y1, z1 x1, y2, z2 ... x1, yN, zN x2, y1, z(N+1) x2, y2, z(N+2) ... x2, yN, z(2N) ...and so on... xM, yN, val(M*N) I have been trying to figure out how to get R to use this data in a persp plot. So far the only thing that I can figure out to do is to break the data file into three different files. The first file contains the x-coordinate data: x1 x2
2008 Jul 25
3
Bug in gap.plot
Hi, all I am trying to make a plot with a axis break and I want the whole plot to be line, not points. However, when I execute the following command half of the graph is points and the other lines. gap.plot(Xdata, Ydata,gap=c(5,6),gap.axis="x",type="l") I think it might be a bug in plotrix. I would greatly appreciate your input. If there is another way to do it, I
2007 Jun 01
1
object not found inside function
Hi! When running the following code I get the message: Error in eval(expr, envir, enclos) : object "A" not found fm <- function(p,ydata, env = parent.frame()) { #fit model y ~ (b0+b1x1+...+bpxp)*exp(g2plus*z2plus) where bi and g2plus are parameters #create design matrix for linear part fo00 <-
2006 Nov 14
1
??: Re: Need help in waveslim package: imodwt and universal.thresh.modwt
Airon, I used R2.4.0 on a Windows XP (SP2) (not Chinese :-)) and it still works: > data = read.csv("u:/airon.csv") > xdata = data$Adj..Close > modwt.la8 = modwt(xdata, "la8", n.level=6) > summary(modwt.la8) Length Class Mode d1 1467 -none- numeric d2 1467 -none- numeric d3 1467 -none- numeric d4 1467 -none- numeric d5 1467 -none- numeric d6 1467
2009 Feb 09
2
Counting session days
hi, I have some session data in a dataframe, where each session is recorded with a start and a stop date. Like this: session_start session_stop =================== 2009-01-03 2009-01-04 2009-01-01 2009-01-05 2009-01-02 2009-01-09 A session is at least one day long. Now I want a dataframe with 'active sessions' per date. Like this: date active_sessions ============= 2009-01-01 1
2006 Nov 12
2
Need help in waveslim package: imodwt and universal.thresh.modwt
Hi: I have encountered problems with imodwt and universal.thresh.modwt and cannot find any reference in R Search. Hope someone can give me some ideas: Starting with modwt.la8 <- modwt(xdata, "la8", n.level=6) <-- this seems to work fine (1) ydata <- imodwt(modwt.la8) will always give ydata as numeric(0) (no values) instead of being a time series data with
2008 Jul 26
1
issues with gap.plot function
Dear all: I have the following codes: Xdata<-c(2,3,8,9,10) Ydata<-1:5 gap.plot(Xdata, Ydata,gap=c(5,6),gap.axis="x",type="o") However, the type='o' seems only work on the first part of gap plot, the second half of the plot always just points, you can not add lines on that part, any help will be highly appreciated. I would like to have these two parts of
2009 Jan 20
5
Error message from CV.GLM
Dear list members. I have problems with the usage of cv.glm from the boot package. Here are some parts of the script I wanted to use: data <- read.table("selected_2D.csv", header=TRUE, sep=",") ? glm.fitted <- glm("ydata$ y ~ 1 + density + vsurf_ID6 + vsurf_S ", data=data) error <- cv.glm(data=data, glm.fitted, K=6) ydata$y is a separate data set, where
2007 Jan 12
5
Regression lines
My simpleminded understanding of simple regression is that when plotting regression lines for x on y and y on x in the same plot, the lines should cross each other at the respective means. But, given the R function below, abline (lm(y~x)) works fine, but abline (lm(x~y)) does not. Why? function () { attach (attitude) x <- rating y <- learning detach (attitude) plot (x, y)
2010 Nov 16
1
Force evaluation of variable when calling partialPlot
Greg, Two thoughts: 1. It might be possible that 'vars' is a reserved word of sorts and if you change the name of your vector RF might be happier 2. A way that works for me is to call importance as follows: sel.imp <- importance(sel.rf, class=NULL, scale=TRUE, type=NULL) and then use the 'names' of the imp data frame to be absolutely clear to RF you are talking about the
2009 Mar 25
1
Creating date seq in data frame
Hi, I have the following type of data: myData <- data.frame(x = 1:5, y = letters[1:5], xDate = seq(as.Date("2001/2/1"), as.Date("2005/2/1"), by="year") ) > myData x y xDate 1 a 2001-02-01 2 b 2002-02-01 3 c 2003-02-01 4 d 2004-02-01 5 e 2005-02-01 What I need is a new column, say xDate2, that for each xDate (or for each unique combination of
2006 Nov 15
2
??: Re:??: Re: Need help in waveslim package: imodwt and universal.thresh.modwt
Airon, I don't think you have to find an English computer 'cause the following must work in your Chinese one :-) Let me explain. First of all, change your lines to xdata <- ckhdat$Adj..Close[1:1447] #names(ckhdwt.la8) <- c("w1", "w2", "w3", "w4", "w5","w6", "v6") note the # sign, i.e., DO NOT change the names
2002 Apr 19
4
Durbin-Watson test in packages "car" and "lmtest"
Hi, P-values in Durbin-Watson test obtained through the use of functions available in packages "lmtest" and "car" are different. The difference is quite significant. function "dwtest" in "lmtest" is much faster than "burbinwatson" in "car". Actually, you can take a nap while the latter trying to calculated Durbin-Watson test. My question
2010 Jul 29
2
multiple graphics windows open
Dear R People: Now I have a function with 3 graphics windows. I'd like for them all to be visible. However, the first window goes blank. Here is the basic setup. The first plot is the entire series. The user selects two points, which in turns generates a subset plot and an EWMA subset plot. Finally, if things worked right, the user should be able to click on "Tile Vertically"
2010 Aug 01
1
aggregating a daily zoo object to a weekly zoo object
Dear R People: I'm trying to convert a daily zoo object to a weekly zoo object: xdate <- seq(as.Date("2002-01-01"),as.Date("2010-07-10"),by="day") library(zoo) length(xdate) xt <- zoo(rnorm(3113),order=xdate) xdat2 <- seq(index(xt)[1],index(xt)[3113],by="week") xt.w <- aggregate(xt,by=xdat2,mean) Error: length(time(x)) ==
2007 Jun 13
5
Confusion with sapply
Hi, I have some confusion in applying a function over a column. Here's my function. I just need to shift non-March month-ends to March month-ends. Initially I tried seq.dates, but one cannot give a negative increment (decrement) here. return(as.Date(seq.dates(format(xdate,"%m/%d/%Y"),by="months",len=4)[4]) ) Hence this simple function: > mydate <-