similar to: "factorise" variables in a data.frame

Displaying 20 results from an estimated 1000 matches similar to: ""factorise" variables in a data.frame"

2009 Jun 12
2
Squaring one column of data
Hi, A fairly basic problem I think, here although searching the inetrnet doesn't seem to reveal a solution. I have a dataset with two columns of real numbers. It is read in via read.table. I simply need to square the data in the second column and then plot it. I have tried extracting the second column (b <- z[2]) and then squaring it and merging it to a variable which is the first column
2009 Jun 23
4
Apply as.factor (or as.numeric etc) to multiple columns
Hi R-helpers, I have a dataframe with 60columns and I would like to convert several columns to factor, others to numeric, and yet others to dates. Rather than having 60 lines like this: data$Var1<-as.factor(data$Var1) I wonder if it's possible to write one line of code (per data type, e.g. factor) that would apply a function (e.g., as.factor) to several (non-contiguous) columns. So, I
2005 Aug 03
1
abline and linearity over groups
Dear R users, please can you help me understand the behaviour of abline using function lm. I'm trying to learn linearity over groups. So I make three groups with 10 values each: test=data.frame(cbind( l=c(rnorm(10,0,30),rnorm(10,100,30),rnorm(10,200,30)), t = c(rep(0,10), rep(1,10), rep(2,10)) )) when I do: plot(test$l~test$t) abline(lm(test$l~test$t)) the abline is a straight line
2007 Oct 18
3
Changing php5 with php4 in CentOS 5
Hi, In our server CentOS 5 is installed. Some of our web pages are compatible with php4 but in centOS 5 , php5 is installed and we cannot see our pages. I want to remove php5 and install php4 but i could not find php4 rpm for CentOS 5. Can anybody help me? Thanks Can ?izer -------------- next part -------------- An HTML attachment was scrubbed... URL:
2010 Jul 23
2
application call to Gosub affects flow of control, and needs to be re-written using AEL
Hi, For some reason (outbound call tracking) I've got a few different outbound call process (using a macro for queuemetrics logging, or direct call) i wanted to factorise the routing process so i came up with something like the following. All in one it's working like expected, however every "ael reload" command trigger a lot of warning like that "application call
2007 Jun 18
1
two bessel function bugs for nu<0
#bug 1: besselI() for nu<0 and expon.scaled=TRUE #tested with R-devel (2007-06-17 r41981) x <- 2.3 nu <- -0.4 print(paste(besselI(x, nu, TRUE), "=", exp(-x)*besselI(x, nu, FALSE))) #fix: #$ diff bessel_i_old.c bessel_i_new.c #57c57 #< bessel_k(x, -alpha, expo) * ((ize == 1)? 2. : 2.*exp(-x))/M_PI #--- #> bessel_k(x, -alpha, expo) * ((ize == 1)? 2. :
2003 Aug 15
2
Oja median
I discovered recently that the phrase "Oja median" produces no hits in Jonathan Baron's very valuable R search engine. I found this surprising since I've long regarded this idea as one of the more interesting notions in the multivariate robustness literature. To begin to remedy this oversight I wrote a bivariate version and then decided that writing a general p-variate version
2003 Apr 27
2
British or American spelling?
I was curious to read the following in the "Guidelines for Rd files" at http://developer.r-project.org/Rds.html: "For consistency, aim to use British (rather than American) spelling. (NB: British spelling often uses -ize as in `capitalize'. The view of spell -b of British spelling is a flawed American one. There are English/Scottish differences
2012 Feb 11
10
Question about reusing classes/modules
Hello Everyone, I''m still pretty new with puppet so please bare with me. I tried searching and I''m pretty sure I''ve ready my answer but I''m not sure if I''m going down the right path just yet. My scenario is this: I have 4 environments, Dev, Test, QA, Prod. Each of these environments lives in 2 sites, LA and NY. I have 5 applications that are site and
2019 Apr 03
2
SAMBA 48 - Dependencies Python27 vs python36
Hello Everyone, Good morning/afternoon/evening. Is there any chance to have SAMBA 48 working with Python36 and its derivatives? ( py36-dnspython-1.15.0.txz. py36-iso8601-0.1.11.txz, py36-ply-3.11.txz, py36-setuptools-40.6.2.txz) Currently SAMBA 48 requires python 26, but that is conflicting with existing packages in the server that is using py36. Any way to work around that issue?
2012 Oct 10
3
How to replicate SAS by group processing in R
Hello, I am trying to re-code all my programs from SAS into R. In SAS I use the following code: proc sort data=upper; by tdate stock_symbol expire strike; run; data upper1; set upper; by tdate stock_symbol expire strike; if first.expire then output; rename strike=astrike; run; on the following data set: tdate stock_symbol expiration strike 9/11/2012 C 9/16/2012
2010 Oct 03
1
plyr: a*ply with functions that return matrices-- possible bug in aaply?
I have an application where I have a function to calculate results for a 2-way table or matrix, which returns a matrix with one less row and column. To keep this short, the function below captures the structure: fun2way <- function(f){ if (!length(dim(f)) ==2) stop("only for 2-way arrays") R <- dim(f)[1] C <- dim(f)[2] f[1:(R-1), 1:(C-1)] } Now, I want to
2010 Mar 03
5
[PATCH, PV-GRUB DOC] Add details to PV-GRUB documentation
Add a couple of documentation details about PV-GRUB support - the menu.lst content can be passed as a ramdisk. - virtual partitions are not supported. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> diff -r b8d2a4134a68 stubdom/README --- a/stubdom/README Wed Mar 03 17:41:58 2010 +0000 +++ b/stubdom/README Wed Mar 03 20:42:53 2010 +0100 @@ -52,11 +52,17 @@ extra =
2012 Jul 11
0
[LLVMdev] Introductions to everyone and a call for Python-LLVM enthusiasts
If you didn't catch it, there has been a recent post to the mailing list that seems like it might be relevant to your interests: <http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-June/051298.html> Direct link to the project page: <http://code.google.com/p/pymothoa/> --Sean Silva On Wed, Jul 11, 2012 at 12:37 AM, Travis Oliphant <travis at continuum.io> wrote: > Hi all,
2010 Sep 10
0
plyr: version 1.2
plyr is a set of tools for a common set of problems: you need to __split__ up a big data structure into homogeneous pieces, __apply__ a function to each piece and then __combine__ all the results back together. For example, you might want to: * fit the same model each patient subsets of a data frame * quickly calculate summary statistics for each group * perform group-wise transformations
2010 Sep 10
0
plyr: version 1.2
plyr is a set of tools for a common set of problems: you need to __split__ up a big data structure into homogeneous pieces, __apply__ a function to each piece and then __combine__ all the results back together. For example, you might want to: * fit the same model each patient subsets of a data frame * quickly calculate summary statistics for each group * perform group-wise transformations
2004 Jan 29
1
302rc1 and AIX 5.2
I'm getting some wierd things going on. Mostly segfaults with testparm, but others as well... AIX 5.2, IBM C compiler version 6.0, libiconv 1.9.1 compiled in shared mode. I've resolved the LIBPATH thing so I can compile correctly now. When I start nmbd, or smbd with the -D option they just chew up a ton of cpu and log level 10 only shows the code pages being mapped and that's it. I
2012 Jul 11
4
[LLVMdev] Introductions to everyone and a call for Python-LLVM enthusiasts
Hi all, First, I just want to say thank you for the excellent LLVM project. I have been playing with LLVM for the first part of this year and have been quite impressed with what I've seen and what is possible. I've been coding for a long time, but haven't had this much fun since I first learned Python. The work you have done has opened the door for a tremendous amount of
2011 Oct 09
2
Playing Rage (Steam version) with a gamepad
I'm playing the newly released game Rage by id software on my Arch Linux 64 bit box and runs quite nicely. I was beginning to wonder if it would be possible to ply the game with controller/gamepad? What is possible/easiest to set up with wine? I have an ps3 controller could that do the job or would it be easier to get an xbox 360 controller or a completely different gamepad? Any suggestions
1999 Nov 04
1
Problem joining a domain
I have a machine that I am trying to join the domain from and am having the following problem: smbpasswd -j DOMAIN -r pdc.domain.com error: modify_trust_password: machine pdc.domain.com rejected the session setup. Error was : code 131 What is error 131, is there documentation of error #'s somewhere. If it is what I think it is, it is telling me that there is another machine with this