search for: ydata

Displaying 20 results from an estimated 24 matches for "ydata".

Did you mean: data
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 followin...
2012 Aug 28
3
date in plot, can't add regression line
...is and the date as the x axis, grouped by the tradetype column. The timestamp column: > class(tradeflavorbyday$timestamp) [1] "POSIXlt" "POSIXt" So in this case I want to plot tradetype 1 (method 1): xdates <- tradeflavorbyday$timestamp[tradeflavorbyday$tradeflavor == 1] ydata <- tradeflavorbyday$x[tradeflavorbyday$tradeflavor == 1] plot(xdates, ydata, col="black", xlab="Dates", ylab="Count") Up to here it works great. Now a abline through lm: xylm <- lm(ydata~xdates) <------ this fails, can't do dates as below abline(xylm...
2009 Jun 17
0
nls with weights
...andard deviation. I've tested it with the following code but I'd like to know whether I should change anything applying the weights. I've only guessed what could give a nice result... Further, I'd like to know, why I get an error message, if I change the bottom-parameter to min(yData)??? Can anybody explain, why it ends up with: "singular gradient" 8< ------------------------------------------------------- >8 sigmoid <- function(x, bottom, top, slope, logec50) { bottom + (top - bottom) / (1 + 10^((logec50-x)*slope)) } xData <- seq(-10,10,1.2) yData1...
2008 Jun 24
2
persp plot
...the three data files created I use them in the following R script: cat << EOF | R --no-save def.par <- par(no.readonly = TRUE) en_range <- c(-6.2, 0.0) om_range <- c(-200.0, 500.0) ze_range <- c(0.0, 1.0) z_perspective <-c(0,3) xdata <- scan("x.txt", list(0)) ydata <- scan("y.txt", list(0)) zdata <- scan("z.txt", list(0)) f <- function(xdata,ydata) { rr <- zdata; rr } z <- outer(xdata, ydata, f) pdf(file="persp.pdf",height = 8, width =8) persp(xdata, ydata, z, axes = TRUE, nticks = 5, ticktype = "detailed...
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 <- paste("~",paste(paste("x",1:p,sep=""),collapse="+"),sep="") fo0 <- as.formul...
2011 Feb 20
0
loop with model fitting pair of consecutive pair of variable: mailing all of you because it was last option
Dear R-users and experts I want to create to analyse my data which looks like follows:( I have show only 8 variables but original variables much more number >1000) *sub* *ydata* *X1* *X2* *X3* *X4* *X5* *X6* *X7* *X8* 1 12 1 1 1 2 1 1 1 1 2 13 2 2 1 2 2 1 1 1 3 11 1 1 1 2 1 2 1 2 4 12 1 1 2 1 1 2 2 2 5 14 1 2 2 1 1 2 2 2 6 12 2 1 1 2 2 1 1 1 7 8 2 2 2 2 1 1 2 1 8 19 1 1 1 1 1 2 2 1 9...
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 would greatly appreciate it. Best wishes, Art Roberts University of Washington Department of Medicinal Chemistry Seattle, WA 9...
2006 Nov 14
1
??: Re: Need help in waveslim package: imodwt and universal.thresh.modwt
...a$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 -none- numeric s6 1467 -none- numeric > ydata = imodwt(modwt.la8) > summary(ydata) Min. 1st Qu. Median Mean 3rd Qu. Max. 37.35 57.56 67.93 67.31 78.32 104.90 > max(ydata-xdata) [1] 2.957279e-11 Can you provide a simple program and the resulting messages showing that it doesn't work? Rogerio. ---------- Cabe...
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 the same lenght as xdata. (2) thred.la8 <- universal.thresh.modwt(modwt.la8, max.level=4, hard=F) will give me error at: abs(wc.fine) - cannot contain non-numeric fiel...
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 t...
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 I take my independent data from. I build an equation with some of the columns in data. Then I generate the generalized linear model, which works. But when...
2010 Jan 11
0
tweedie.profile error message
...round~Treatment*Time*Site, p.vec=seq(1.1,1.9, length=10), method="interpolation", do.ci=TRUE, do.smooth=TRUE, do.plot=TRUE)) Computing for p =1.1, 1.188889, 1.277778, 1.366667, 1.455556, 1.544444, 1.633333, 1.722222, 1.811111, 1.9, Done. Warning messages: 1: In glm.fit(x = model.x, y = ydata, weights = weights, offset = offset, : algorithm did not converge 2: In glm.fit(x = model.x, y = ydata, weights = weights, offset = offset, : algorithm did not converge 3: In glm.fit(x = model.x, y = ydata, weights = weights, offset = offset, : algorithm did not converge 4: In glm.fi...
2010 Nov 16
1
Force evaluation of variable when calling partialPlot
...paste(basedir,"/sw_climate_dataframe_",root.name,".csv",sep="") data <- read.csv(data.in) vars <- c("sm1","precip.spring","tmax.fall","precip.fall") #selected variables in data frame xdata <- as.data.frame(data[,vars]) ydata <- data[,5] ntree <- 2000 rf.pdplots <- function() { sel.rf <- randomForest(xdata,ydata,ntree=ntree,keep.forest=TRUE) par(family="sans",mfrow=c(2,2),mar=c(4,3,1,2),oma=c(0,3,0,0),mgp=c(2,1,0)) for (i in 1:length(vars)) { print((vars)[i]) partialPlot(sel.rf,xdata...
2006 Nov 15
2
??: Re:??: Re: Need help in waveslim package: imodwt and universal.thresh.modwt
...7508611,79.65 > >xdata <- ckhdata$adjcls[1:1447] > > ckhdwt.la8 <- modwt(xdata, "la8", n.levels = 6) > > names(ckhdwt.la8) <- c("w1", "w2", "w3", "w4", "w5","w6", "v6") > > > > ydata <- imodwt(ckhdwt.la8) > > ydata > numeric(0) > > thre_wc_univ <- universal.thresh.modwt(ckhdwt.la8, max.level = 4, hard = FALSE) > ???abs(wc.fine) : ?????????? > > > > Note that the error message for universal.thresh.modwt is in Chinese. It roughly means &q...
2008 Jun 11
1
computing and showing mean
...the following code: dat<-read.table(file="C:\\Documents and Settings\\Owner\\My Documents\\Yeast\\Yeast.txt",header=T,row.names=1) file.show(file="C:\\Documents and Settings\\Owner\\My Documents\\Yeast\\Yeast.txt") x<-dat[2,23:46] y=mean(x,trim=0,na.rm=T) save(y,file="ydata") Am I computing the mean correctly and how to I show the value of the mean to the screen? [[alternative HTML version deleted]]
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
2006 Aug 20
1
Simple RGB->YUV Stuff...
..., and strides correctly. What I've been trying to use is: yuv_buffer yuv; yuv.y_width = Width; yuv.y_height = Height; yuv.y_stride = Width; yuv.uv_width = Width; yuv.uv_height = Height; yuv.uv_stride = Width; yuv.y = YDATA; yuv.u = UDATA; yuv.v = VDATA; There isn't a lot of documentation on how Theora "wants" the pixel data in theora.h, so I really feel like this should be right (since I have a 1:1:1 ratio of RGB data to YUV data). The Y data is perfect--that is, the gra...
2010 Aug 30
1
[LLVMdev] Recursion in TableGen
...), !cdr(data), name, default>.Result); } class Foo<string name, list<Data> data = []> { string Name = name; // Set some data. int XData = Find<data, "X", 0>.Result; int YData = Find<data, "Y", 0>.Result; int ZData = Find<data, "X", 0>.Result; } def FOOX : Foo<"X", [X]>; def FOOY : Foo<"Y", [X, Y]>; def FOOZ : Foo<"Z", [Y, Z]>; Unfortunately, the part of TableGen that generates anonymous...
2009 Oct 27
0
boxplot using grid
....75, "npc")), rep(unit(bxp$stats[3], "native"), 2), gp = gpar(lwd = 2), name = "median" ) if(On != 0){ grid.points(x = rep(unit(0.5, "npc")), y = O) } } # Code run x <- rnorm(100) pushViewport(plotViewport()) pushViewport(dataViewport(yData = x, xscale = c(0, 1))) grid.yaxis() bxplt(x) Additionally, some people might be wondering why I am reimplementing the bocplo using grid. The reason is that I need to annotate the plot with something a little more elegant than arrows... I wrote the following function, which seems to work, but I...
2011 Oct 04
0
ggplot2: not displaying annotation (label = expression) in/on graph
...is comprised of text and the value of a variable. Thanks to the response from Joshua Wiley <jwiley.psych@gmail.com> on the thread "How to format R superscript 2 followed by "=" value, I can now get R^2 = value. However with the following code: ggplot(blData, aes(x = xData, y = yData)) + geom_point(aes(colour = factor(diagnosis))) + geom_smooth(method = "lm") + opts(legend.position = c(0.75, 0.25)) + scale_colour_discrete(name = "Diagnosis") + labs(x = r2format(t0.lm, output = "R^2 == rval", sub = "rval")) + #"Bas...