Displaying 7 results from an estimated 7 matches for "siddique".
2003 Jul 18
2
create a vector looping over a frame
...o the ith variable?
eg,
sumvar<-c(sum(WM),...,sum(AF))
if i try
for(i in 4:13){
sumVar<- sum(popA[,i])
sumVar2<-c(sumVar)
}
it returns
> sumVar2
[1] 287567
> length(sumVar2)
[1] 1
which is only the value at the last spot. i cant quite figure this simple
loop.
Thanks,
Amer Siddique
2004 Feb 06
2
vector of factors to POSIXlt
hello,
I have a vector of factors
> str(rcptdt)
Factor w/ 51 levels "1/10/03","1/13/03",..:
> length(rcptdt)
[1] 87
which i want to convert to class POSIXlt to extract the day, so:
a1<-format(rcptdt,"%m/%d/%y")
> length(a1)
[1] 87
and:
a2<-strptime(a1, "%m/%d/%y")
str(a2)
`POSIXlt', format: chr [1:87] "2002-04-18"
2004 Nov 02
2
using R in .NET apps
looking for some thoughts on incorporating R functionality to create
histograms of data stored in an informix db. im gonna write the app in .Net
and will use a managed provider to access the data. what R libs might I have
to package in the assemblies? (sorry my Q is general as Ive only just looked
at wanting this yet)
Thanks. Amer.
2005 Jul 28
1
Displaying p-values in latex
Hi. I want to create a table in latex with regression coefficients and their
corresponding p-values. My code is below. How do I format the p-values so
that values less than 0.0001 are formated as <.0001 rather than just rounded
to 0.0000? Thank you.
model<-lm(y~x1+x2)
output<-summary(model)
output<-as.matrix(coefficients(output))
output<-format.df(ouput,cdec=c(2,2,2,4))
2007 Sep 26
1
rpart error: "Error in dimnames(X)"
I'm using rpart to fit a tree using a large dataset: 7000 observations, 4651
variables. All but one of the variables (age) are binary. When I run the
code:
fit1 <- rpart(lowergi ~ ., data=dset,method="class")
I get the error:
Error in dimnames(X) <-list(dn[1L]], unlist(collabs, use.names=FALSE)) :
Length of `dimnames' [2] not equal to array extent
I have no idea
2003 Nov 07
1
barplot(names.arg) versus axis(labels)
Should I be able to use axis() on a barplot? i have a data.frame, the first
3 values of which are:
> c[1:3,]
median mean
A1 56.5 58.50000
A61 73.0 73.00000
A62 63.0 63.00000
> str(c)
`data.frame': 19 obs. of 2 variables:
$ median: num 56.5 73 63 161 51 55 44.5 22 54 49 ...
$ mean : num 58.5 73.0 63.0 161.0 47.5 ...
if I do barplot(median) and then try
2005 Aug 16
1
Overall Legend
Hello. I am using R version 2.1.1 on Windows 2000.
I am using a par(mfrow=c(2,2)) statement to produce 4 plots on one screen. I want a single horizontal legend to appear at the top of the four plots. My code is something like this:
par(mfrow=c(2,2))
plot(x,y1)
lines(x,y2)
lines(x,y3)
plot(x,z1)
lines(x,z2)
lines(x,z3)
plot(x,t1)
lines(x,t2)
lines(x,t3)
plot(x,w1)
lines(x,w2)
lines(x,w3)