similar to: Creating Dummy Variables in R

Displaying 20 results from an estimated 6000 matches similar to: "Creating Dummy Variables in R"

2010 Apr 07
1
ggplot2, density barplot and geom_point layer
Hi, Please consider the example below. How can I manage to overlay the points the way I want in the second case? Thanks, Joh library(ggplot2) # Modify data to match "real" case myDiamonds <- diamonds myDiamonds[["clarity"]] <- as.character(myDiamonds[["clarity"]]) myDiamonds[myDiamonds[["clarity"]]=="I1","clarity"] <- 1
2018 Feb 08
2
sparse.model.matrix Generates Non-Existent Factor Levels if Ord.factor Columns Present
Good day, Sometimes, sparse.model.matrix outputs a dgCMatrix which has column names consisting of factor levels that were not in the original dataset. The first factor appears to be correctly transformed, but the following factors don't. For example: diamonds <- as.data.frame(ggplot2::diamonds) > colnames(sparse.model.matrix(~ . -1, diamonds)) [1] "carat"
2009 Aug 17
1
Display the character variables in a dataset in R
Hi everyone, After reading the external file into R it will become a R dataset. Now my querry is i want to dispaly only character variables from that dataset. please help me in this aspect. if possible send me the code. it will be very helpful for us. Thank you in Advance. -- View this message in context:
2010 Dec 07
2
tableGrob and properties of a cell
Hello there, could you please help to modify gpar() properties of a cell inside tableGrob() output. In the following example I want to have different color for one out of 4 cells require(gridExtra) z<-matrix(1:4,2,2) grid.draw(tableGrob(z)) The only way I found for now how to do it is to do something like this downViewport(current.vpTree()$children[[1]]$children[[6]]$name)
2018 Feb 08
0
sparse.model.matrix Generates Non-Existent Factor Levels if Ord.factor Columns Present
color and clarity are ordered factors, so sparse.model.matrix is generating orthogonal-polynomial contrasts (see ?contr.poly). This is by design ... what are you trying to do? Are you interested in fac2sparse? On 18-02-07 11:00 PM, Dario Strbenac wrote: > Good day, > > Sometimes, sparse.model.matrix outputs a dgCMatrix which has column names consisting of factor levels that were not
2009 Sep 17
3
latex code in R -> convert to pdf
hi, is it possible to convert latex code to pdf in R (like a latex-program would do it)? Is there a package that comes with this capabilities? My problem is that I want to generate tables automatically - and I can't use a latex editor at that computer ... Besides latex ... are there good ways to generate tables in R? thanks for any suggestions!
2002 Jan 29
12
Issues with SFTP
Things consider problems with sftp software - sftp manually first time to accept the fingerprint and anytime software is updated on host. - no ascii mode only binary - no verbose or indication of bytes transfered (you would do an ls after sftp is done) - no mput or mget (this may be a show stopper) but could script could generate itself with all the filenames takes coding. Kenneth
2003 Jan 03
2
R talking to Oracle, ODBC drivers available ?
[sorry, but this is a re-post - I forgot to set the subject line the first time around] Hello, I would like to access an Oracle database running on Solaris from R on my linux desktop. I have had a look at the R Data Import/Export manual, and downloaded RODBC and unixODBC, but I am still quite confused about how to proceed. It appears to me that I still need to get an Oracle ODBC driver, and
2004 Oct 24
2
MySQL auth
> > I have started an implementation in the kh branch, so that libcurl > could > be used for listener auth, so can shell commands, but neither have been > used in anger yet. Ooo. :) Having just had a look at auth_curl.c in kh, that would probably do what we want even better. Is it possible (or would it *be* possible) to make <mount> sections take wildcards for
2002 Oct 31
3
Loess with glm ?
Hello, I am wondering if there is an easy way to combine loess() with glm() to produce a locally fitted generalised regression. I have a data set of about 5,000 observations and 5 explanatory variables, with a binary outcome. One of the explanatory variables (lets call it X) is much more predictive than the others. A single glm() regression over the entire data set produces rather poor results,
2009 Aug 17
1
help simplifying complex graphic arguments to a function
I'm working on a package to produce graphic displays of 2- and 3-way tables and need some help/advice on how to simplify the specification of a complex argument that gives the drawing details for each cell of the table. Prototypes of two functions, 'tableplot' and 'cellgram' are given below. The essential idea is that for a given table ('values'), the cells can be be
2003 Jan 17
1
DBI/ROracle for remote database connection ?
Hello, I have installed the ROracle and DBI packages, and I want to access an Oracle database that is not on the same machine as the one I am running R on. I can access the database remotely with perl DBI and Java JDBC. Does anyone know if this is possible using R DBI/ROracle ? I have looked through the documentation and also tried to guess at things which might work, but with no success. I
2003 Apr 17
1
Measure of linearity between two variables?
Hello, I am looking for a measure of linearity in the relationship between two variables. Specifically, I have two variables for which the relationship is reasonably linear over a certain range of values, and then diverges from linearity at either end of the range, as one or other variable "saturates" at a maximum or minimum value. I want to identify the region of linearity, where
2011 Jul 11
2
[LLVMdev] Submitting patches
Hi, I am intending to submit some patches that enhance the SPARC code generator. Is this the preferred place to post them, or should I send them to llvm-commit? Martin
2012 May 01
2
Hypothesis Testing using Wald Criterion for two regression models with dummy variables
I have two models, controlled by dummy variables to see if the models can be combined into one model with similar intercepts and slopes. Has anyone tried to conduct this type of test in R. I am utilizing the econometric idea of hypothesis testing through the hypothesis of coincidence. I have tried to run an anova with test of Chisq, but I am not sure what the results are telling. In addition, I
2004 Oct 25
2
MySQL auth
On Sun, 2004-10-24 at 15:33, Mike Whitaker wrote: > On 24 Oct 2004, at 13:25, Mike Whitaker wrote: > > > Ooo. :) > > > > Having just had a look at auth_curl.c in kh, that would probably do > > what we want even better. nice, these things aren't fully settled yet, for instance are enough parameters passed etc. > > Is it possible (or would it *be*
2007 Mar 20
2
Any R function for self-controlled case series method /effect absorption?
Hello, Has anyone written R functions for applying self-controlled case series methods (http://statistics.open.ac.uk/sccs/). In fact only thing needed is to modify glm function to allow absorption of effect. Eg. in Poisson model individual effect is used as factor, but it is considered as nuisance term where parameter estimates are not needed. Could anyone point how absorbing individual
2010 May 12
1
DOS Attributes with mixed xattr filesystem support
Hi, I'm running Samba as a glorified NAS at the moment - to begin with, I have an ext3 storage partition, /storage. In this is a directory, /storage/Personal, which has its own Samba share (also Personal). At this point, dos attributes using filesystem xattrs work beautifully. The problem comes when I start to fiddle further... I have a Novell NetWare filesystem (ncpmount) mounted at
2002 Oct 02
1
Parameterisation of interaction terms in lm
Hello, I have a 2 factor linear model, in which the only terms I am interested in estimating and testing are the interaction terms. I want to control for the main effects but have no interest in estimating or testing them. However, I would like an estimate of the interaction effects for every level of the interactions, whereas what I get is one fewer estimate than this, with the first level
2002 Feb 04
1
Installing contributed packages on MacOS X: Solved!
I had run into problems when compiling some contributed packages to an installation of R 1.40 by fink on MacOS X. Namely, packages KernSmooth (2.22-7) and cluster (1.4-0) would not find required libraries, though those were present on the system. Jeff Whitaker, the maintainer of the R fink packages, kindly sent me this: > Kaspar: It's not looking in /sw/lib, where the libs are (the