Displaying 20 results from an estimated 4000 matches similar to: "Creating a Model Matrix - keeping NAs"
2002 May 13
3
Histograms rotated, side-by-side
Hi there,
I am wanting to create 8 side-by-side histograms which have been rotated 90
degrees clockwise from how they usually sit.. all with the same scales. Is
someone able to help me out?
Thanks so much,
Rachel Cunliffe
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send
2001 Feb 28
1
windows() options
Hi
Just noticed that the windows() function doesn't seem to allow for decimals
in the width and height options. For example, typing:
> windows(5,4,10)
> windows(5.2,4,10)
> windows(5.4,4.3,10)
produces three equally sized windows. Is there a way to get around this and
create more accurately sized windows without having to resize by hand?
Thanks
Rachel Cunliffe
Department of
2001 Aug 09
2
Pulling columns out of a data.frame
Hi there
Probably a very simple solution to this problem.
I have a character vector eg c("name1","name2","name3") and I want to pull
out these columns from a data.frame, converting each of these columns into
factors also.
Many thanks
Rachel
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2001 Aug 10
1
apply and factor
Hi again
Why does this occur?
> test <- apply(data,2,factor) # where data is a data.frame
> is.factor(test[,1])
[1] FALSE
Many thanks,
Rachel
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the
2007 Jun 15
2
model.frame: how does one use it?
Philipp Benner reported a Debian bug report against r-cran-rpart aka rpart.
In short, the issue has to do with how rpart evaluates a formula and
supporting arguments, in particular 'weights'.
A simple contrived example is
-----------------------------------------------------------------------------
library(rpart)
## using data from help(rpart), set up simple example
myformula <-
2009 Oct 11
3
passing field name parameter to function
Hi,
I am passing a data frame and field name to a function. I've figured out how
I can create the formula based on the passed in field name, but I'm
struggling to create a vector based in that field.
for example if I hard code with the actual field name
Y = df$Target, everything works fine.
but if I use the passed in parameter name, it doesn't give me what I want,
Y =
2010 Jan 05
1
Is the Intercept Term always in First Position?
Dear All,
I have a question about formulas and model.matrix(). If one specifies a model via a formula, the corresponding design matrix can be obtained with the model.matrix() function. For example:
x1 <- c(1,4,2,3,5)
x2 <- c(1,1,2,2,2)
myformula <- ~ x1 + factor(x2)
model.matrix(myformula)
My question is: If an intercept term is in the model (like in the example above), is it always
2010 Jan 01
1
Questions bout SVM
Hi everyone,
Can someone please help me in these questions?:
1)if I use crossvalidation with svm, do I have to use this equation to calculate RMSE?:
mymodel <- svm(myformula,data=mydata,cross=10)
sqrt(mean(mymodel$MSE))
But if I don’t use crossvalidation, I have to use the following to calculate RMSE:
mymodel <- svm(myformula,data=mydata)
mytest
2009 Oct 10
1
field names as function parameters
Hi,
I am passing a data frame and field name to a function. I've figured out how
I can create the formula based on the passed in field name, but I'm
struggling to create a vector based in that field.
for example if I hard code with the actual field name
Y = df$Target, everything works fine.
but if I use the passed in parameter name, it doesn't give me what I want,
Y = df$mytarget
2010 Mar 14
1
Error in object$tables[[v]] : subscript out of bounds
Hi,
Could you please tell me how I correct the following error message?
“Error in object$tables[[v]] : subscript out of bounds”
This is the code:
library(e1071)
data(iris)
attach(iris)
class_label <- names(iris)[1]
myformula <- formula(paste(class_label,"~ ."))
mymodel<-naiveBayes(myformula, iris,cross=3)
predict(mymodel,iris) ##Error in object$tables[[v]] :
1999 Apr 10
1
R/S compatibility in passing a formula
In S3 if you are passing an evaluated formula to another function that
will store it and use it in printing (such as a model-fitting function), you
usually want to unclass the formula. Otherwise, the formula that gets
stored looks very ugly when printed. A trick to do the unclassing is to pass
form = c( myFormula )
In R this has the effect of making form a list rather than a call. It
seems
2011 Apr 18
2
as.formula doesn't want to take a phrase
Hello!
I am trying to create a formula object using as.formula. But it's not working:
examplephraze<-"for.my.example"
myformula<-as.formula(paste(examplephraze,"~group, sum, data=mydata",sep=""))
What's the problem?
Thanks a lot!
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
2016 Sep 22
1
Centos doesn't load or work
I've tried Zorrin, Ubuntu and Centos.
Zorrin and Ubuntu work fine, but Centos doesn't load, or run.
I asked for advice, didn't get any and seem to have been added to all your Centos mailing lists.
Please remove me from your mailing lists.
Sincerely,
Bob Cunliffe
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Jan 25
16
Slideshow beta
Ok,
I finally got the slideshow code to a state worth showing it
off. The site is a very rough cut of a site I''m building for my wife''s
photography, so ignore the unfinished design for now :)
http://rachel.kathihill.com/
To see the ajax version, go to:
http://rachel.kathihill.com/?ajax=1
To randomize the order the images show:
http://rachel.kathihill.com/?random=1
To change
2009 Apr 28
3
creating a vector of sums
Hi,
I am trying to create a function for a goodness-of-fit test for the Pareto Distribution for some loss data that I have.
So far I have the following:
function(X=OTOL)
{
n <- length(X)-1 #calculated the number of values (extra as 0 included)
i <- 2:640 #values of i
j <- 1:639 #values of i-1
Y <- (n-j+1)*((X[i])-(X[j])) #First part of GoF model
Y
}
Where OTOL is the ordered loss
2002 Sep 11
2
lattice package syntax error
I just tried downloading the lattice package from CRAN but got a syntax
error when loading the library (see below).
> {a <- CRAN.packages()
+ install.packages(select.list(a[,1],,TRUE), .lib.loc[1], available=a)}
trying URL `http://cran.r-project.org/bin/windows/contrib/PACKAGES'
Content type `text/plain; charset=iso-8859-1' length 7505 bytes
opened URL
downloaded 7505 bytes
trying
2009 Nov 13
2
help sample from large dataset - misleading error?
Hi All,
I want to take a simple random sample from a large dataset, gly, but I'm
getting an error message. Any help?
dim(gly)
[1] 112371 37
> s1 <- sample(gly,100)
Error in `[.data.frame`(x, .Internal(sample(length(x), size, replace, :
cannot take a sample larger than the population when 'replace = FALSE'
Thanks,
Rachel
[[alternative HTML version
2006 Jun 04
2
Can anyone help?
Quick question please....A user logs into windowsXP and tries to create a folder/document and the ownership on the new file/folder defaults to nobody:nobody. I have the user set up in samba on the IRIX machine. All other users have no problem. Anyone have any suggestions?
Thanks
Rachel
2009 Jul 09
3
Stratified data summaries
Hi All,
I'm trying to automate a data summary using summary or describe from the
HMisc package. I want to stratify my data set by patient_type. I was
hoping to do something like:
Describe(myDataFrame ~ patient_type)
I can create data subsets and run the describe function one at a time,
but there's got to be a better way. Any suggestions?
Rachel
[[alternative HTML
2013 Jun 12
2
Executing a script after creating vhosts with create_resources
Hello
I''d love a bit of advice in terms of how I should best go about this.
I am creating a bunch of vhosts, their definitions are stored in json (I''m using heira) that json file will be generated from data held on another server. I''m just using the puppetlabs apache module and create_resources to then generate all the vhosts and their directories etc. I''m