Displaying 11 results from an estimated 11 matches for "cdat".
Did you mean:
cat
2008 Mar 26
2
ggplot2 argument handling odd
Hello there,
I'm trying to do lots of plots in one for-loop. But somehow ggplot does
not evaluate arguments as expected. Here is an example:
library(lattice)
library(ggplot2)
pl <- list()
pl2 <- list()
cDat <- as.data.frame(cbind(x1=0:100,x2=0:10,x3=1:20))
for(obs in c("x1", "x2")) {
pl[[obs]] <- xyplot(cDat[,obs] ~ cDat[,"x3"], main=obs)
pl2[[obs]] <- qplot(cDat[,"x3"], cDat[,obs], main=obs)
}
The pl list contains finally my desired result pl$x1 a...
2004 Jun 16
2
subset and lme
...set:
If I try:
csubset <- dat$Diagnosis==0
cont <- lme(fixed=cform,
random = ~1|StudyName,
data=dat,subset=csubset,na.action=na.omit)
Then I get:
Error in eval(expr, envir, enclos) : Object "csubset" not found
But if I do instead:
cdat <- dat[dat$Diagnosis==0,]
cont <- lme(fixed=cform,
random = ~1|StudyName,
data=cdat,na.action=na.omit)
Then everything is fine.
I'm puzzled that the object can't be found. Maybe I'm
overlooking something obvious?
Best,
Todd Ogden
2002 Sep 30
0
using step function in functions
...16-0404
225 North Michigan Ave.
Chicago, IL 60601 U.S.A.
# Vector Auto Regression
VAR <- function(rData0,lagz) {
# build regression datasets
rData<-na.omit(rData0)
dimz<-dim(rData)
depDat<-rData[(lagz+1):dimz[1],]
print((dim(depDat))[1])
for (i in 1:lagz) {
cDat<-rData[(lagz-i+1):(dimz[1]-i),]
for (j in 1:dimz[2]) {
names(cDat)[j]<-paste(names(cDat)[j],"xL", i,
sep="",collapse=NULL)
}
if (i==1) indDat<-cDat else indDat<-cbind(indDat,cDat)
}
# build regression models
for...
2010 Jul 21
1
Get distribution of positive/negative examples for each cluster
Dear R experts,
I have a labeled data set. Each data is assigned a binary label 0 or 1.
Assume that I use some clustering algorithm to group the data by clusters
(using some features of the data). Now I want to know how many data are
labeled as 0/1 in each cluster.
For example, assume that I have 9 labeled data grouped into three clusters.
The ids of the clusters are 1, 2, and 3. The dataset is
2011 Sep 09
1
Question about plot.mona {cluster}
Hello all, I what to print the banner plot that is output from the mona
method in the cluster package but the problem is I dont want to print all
that red ink. Here is an example:
data(animals)
ma <- mona(animals)
ma
## Plot similar to Figure 10 in Struyf et al (1996)
plot(ma)
I can change the bar color by using the argument col=c(0,0) -
plot(ma,col=c(0,0)) - but then the variable labels also
2011 Apr 12
1
2-parameter MLE problems
Hi all,
Sorry for the re-post, I sent my previous e-mail before it was complete. I
am trying to model seroprevalence using the differential equation: dP/dt =
beta*seronegative*.001*(seropositive)-0.35*(0.999)*(seropositive)-r*seropositive.
I would like to estimate my two parameters, beta and r, using maximum
likelihood methods. I have included my code below:
2013 Apr 09
0
Simple GLS regression with CAPER
...copy the .tree and .data files and run
> R
> source("toy.R")
(please find the outpt below)
Am I doing anything wrong?
Thanks in advance,
regards,
Xavier Prudent
==================================
>>>>>>> Regression #2
Call:
pgls(formula = t1 ~ t3, data = cdat)
Coefficients:
(Intercept) t3
0 1
Call:
pgls(formula = t1 ~ t3, data = cdat)
Residuals:
Min 1Q Median 3Q Max
0 0 0 0 0
Branch length transformations:
kappa [Fix] : 1.000
lambda [Fix] : 1.000
delta [Fix] : 1.000
Coeffi...
2008 Dec 06
2
How to calculate words in column?
Hi,
I have a table for an 1 week exam result for many classes in school, like
this:
Day Class_ID Test Result
1 Monday 1 Paper Passed
2 Tuesday 1 Oral Passed
3 Friday 1 Paper Passed
4 Monday 3 Paper Passed
5 Sunday 3 Oral Passed
6 Monday 3
2004 Nov 08
3
location of key in panels of trellis plot
...or each condition. No problem.
xyplot(var1~var2|condition,data=dataframe,ylim=c(4,-4))
####Now I want to add a key to each panel indicating the values on the
parameters 1-3.
####To do so I write my own panel function that calls draw.key
tmp.xyplot <- function(x,y,subscripts=subscripts,cdata=cdata){
# plot data points
panel.xyplot(x,y)
# extract parameter values
right <- as.character(cdata[subscripts,][1,c(4,5,6)])
#### draw the key on the panel
draw.key(list(text=list(expression(t[1],t[infinity],"p")),
text=list(c...
2011 Feb 16
1
Timeseries Data Plotted as Monthly Boxplots
...ble) <- c("yearstart", "monthstart", "yearend", "monthend")
fn <- paste(stn, ".", vars[v], ".FIN", sep="")
if(file.exists(fn)) {
clim.dat <- read.csv(fn, header=F)
names(clim.dat) <- c("cdata")
year.start <- ym.table$yearstart
year.end <- ym.table$yearend
mo.start <- ym.table$monthstart
mo.end <- ym.table$monthend
regts.start = ISOdatetime(year.start, mo.start, 1, hour=0, min=0,
sec=0, tz="GMT")
regts.end = IS...
2007 Sep 22
0
rsync build on IA64 using icc
...c101 811841 Sep 21 18:02 rsync-2.6.9.tar.gz
drwxr-xr-x 33 mccssmb2 mcc101 4096 Sep 21 18:02 ..
drwxr-xr-x 8 mccssmb2 mcc101 4096 May 11 17:51 parallel-netcdf-1.0.1
-rwxr--r-- 1 mccssmb2 mcc101 5497446 Feb 16 2007 xconvR81.91
-rw------- 1 mccssmb2 mcc101 170118548 Jan 25 2007 CDAT-4.1.2-everything.tar.gz
drwxr-xr-x 4 mccssmb2 mcc101 4096 Jan 25 2007 pave_v2.2
-rw-r--r-- 1 mccssmb2 mcc101 35000320 Jan 6 2007 parallel-netcdf-1.0.1.tar
drwxr-xr-x 2 mccssmb2 mcc101 4096 Nov 22 2006 swapbytes-0.1
-rw-r--r-- 1 mccssmb2 mcc101 10240 Nov 22 2006 swapbytes...