similar to: replace certain elements in data frame

Displaying 20 results from an estimated 400 matches similar to: "replace certain elements in data frame"

2011 Apr 20
1
counting values in multiple columns
Hello, I have a table that has 2000 rows and 8 columns. The headings of columns are: yearjel.code.1jel.code.2jel.code.3jel.code.4jel.code.5jel.code.6 jel.code.7. Under each column, there are either numbers or blank spaces corresponding to the given year. For instance, my 10th row is:1019838242824382609170 I want to count how many times each code appears in total and how many times it appears in
2009 May 01
5
PyGrub + ZFS: getbootstring. How it works?
I have NexentaCP2 (Opensolaris b104+). Parameters for the kernel: ''zfs-bootfs=syspool/rootfs-nmu-000,bootpath=/xpvd/xdf@0:a'' Pygrub returns: ''zfs-bootfs=syspool/30,bootpath=/xpvd/xdf@0:a'' Result: Boot with pygrub don''t work. What is "30" in syspool/30 ? _______________________________________________ Xen-users mailing list
2012 Jun 02
1
mtext bug
Sir, I have hit a the limits of my understanding of text / par / opar etc... I have a few related xts data frames which have multiple columns, and have written a for-loop to make a set of charts - however i do not get any margin text when i run the loop. when i test the code outside of the loop the margin text appears - however when i run the loop the margin text does not appear ... what gives?
2010 Jun 01
2
storing output data from a loop that has varying row numbers
Hi All, I am trying to run a loop that will have varying numbers of rows with each output. Previously I have had the same number of rows so I would use (and I appreciate that this will no doubt achieve some gasps as being thoroughly inefficient!): xdfrow<-(0) xdfrow1<-(1:32) xdfrow2<-(33:64) xdfrow3<-(65:96) xdfrow4<-(97:128) xdfrow5<-(129:160) xdfrow6<-(161:192)
2011 Jun 14
1
Obtaining OLAP cubes using R
Hello All, I have a dataset and I wish to obtain all possible data cuboids from it using R . For eg if my data frame is : A B C 1 1 1 1 2 1 2 2 1 The output intended is : A=1 A=2 B=1 B=2 C=1 A=1,B=1 A=1,B=2 A=2,B=2 A=1,C=1 A=2,C=1 B=1,C=1 B=2,C=1 A=1,B=1,C=1 A=1,B=2,C=1 A=2,B=2,C=1 Are there any function(s) to do this in R ? I tried a combination of expand.grid and
2011 Jun 14
1
Expand DF with all levels of a variable
Dear list, I would like to expand a DF with all the missing levels of a variable. a <- c(2,2,3,4,5,6,7,8,9) a.cut <- cut(a, breaks=c(0,2,6,9,12), right=FALSE ) (x <- data.frame(a, a.cut)) # In 'x' the level "[0,2)" is "missing". AddMissingLevel <- function(xdf) { xfac <- factor( c("[0,2)", "[2,6)", "[6,9)",
2009 Nov 06
2
how can I delete those columes with the same element in every row?
e.g. a= a b c d e 1 1 1 3 1 1 2 1 2 3 4 5 3 1 3 3 8 3 4 1 4 3 3 5 5 1 1 3 1 1 I want to delete colume a and colume c, because they have the same values in every row, then ,I want to get this data.frame . b= b d e 1 1 1 1 2 2 4 5 3 3 8 3 4 4 3 5 5 1 1 1 the following is my code but it's wrong. rm(list=ls()) a=c(1,1,1,1,1); b=c(1,2,3,4,1); c=c(3,3,3,3,3);
2015 Jan 22
3
need help with renaming a variable
Hello. I am new to R, so my question/problem might be very basic, but I cannot figure out how to solve it. So, I would really appreciate your help. I would like to rename a variable in a very large file (181GB) called "2013.xdf" that is saved on my external hard drive. I tried running the following code to rename variable # 2 in the file and save this change, which produced some
2011 Apr 30
1
More flexible aggregate / eval
Dear list, I would like to do some calculation using different grouping variables. My 'df' looks like this: # Some data set.seed(345) id <- seq(200,400, by=10) ids <- sample(substr(id,1,1)) group1 <- rep(1:3, each=7) group2 <- rep(1:2, c(10,11)) group3 <- rep(1:4, c(5,5,5,6)) df <- data.frame(id, ids, group1, group2, group3) df <- rbind(df, df, df) df$time <-
2009 Mar 25
2
need help with ordering of plots
I want to do a series of contour plots, 4 in all. The data is coming from a data frame named "nd.frame", which has elements "xdf", "ydf", "zdf", and "pndt". I am treating "pndt" as a factor, and it has four levels. I make a call to the lattice graphics routine "contourplot" like so:
2009 Jul 04
3
OpenSolaris 2009.06 in stub (hvm) domain at Xen 3.4.1 Dom0 with 2.6.30 vs 2.6.29.4 xenified kernel
Andy, OSOL 2009.06 been installed in stub domain (hvm domain) at mentioned Dom0 with 2.6.30 xenified kernel via xen-patches-2.6.30-2.tar.bz2 refuse to activate PV drivers. When same Dom0 starts with 2.6.29.4 xenified kernel (xen-patches-2.6.29-6.tar.bz2) kernel OSOL 2009.06 in stub (hvm) domain does activate PV drivers for xdf, xnf . Boris
2012 Mar 09
4
For loop and using its index
Dear All, I have a data set with variables x1, x2, x3, ..., x20 and I want to create z1, z2, z3, ..., z20 with the following formula: z1 = 200 - x1 z2 = 200 - x2 z3 = 200 - x3 . . . z20 = 200 - x20. I tried using a for loop and its index as: for (i in 1:20) { z(i) = 200 - x(i) } But R gives the following error message: "Error: could not find function "x"". Is there any
2016 Feb 28
2
Re: [PATCH] added ntfscat_i api
> Anyway, I'll fire up a Debian box in my cloud and see if I can > reproduce this also. I was able to install stretch, starting from jessie [from `virt-builder debian-8'], changing s/jessie/stretch/ in sources.list, and upgrading in the usual way. To install gfs2-utils I had to add jessie as another apt source [see my final sources.list attached]. That package is not in stretch, I
2009 Jul 01
14
can''t boot 2009.06 domU on Xen 3.4.1 / CentOS 5.3 dom0
I''ve got a CentOS 5.3 dom0 with Xen 3.4.1-rc5 (or so). I''ve tried the same stuff below with 3.4.0, no difference. I''m trying to install 2009.06 PV domU based on instructions from [1] and [2]. I can run the install fine, I can also get the kernel and boot archive (from [2]) after the install. But for the life of me I can''t get the installed domU to boot. If I
2009 Jan 07
5
rbind for matrices - rep argument
Dear R users,I'm facing a trivial problem, but I really can't solve it. I've tried a dozen of codes, but I can't get the result I want. The question is: I have a dataframe like this one [,1] [,2] [,3] [,4] [,5] [1,] 1 2 3 4 5 [2,] 2 5 5 4 9 [3,] 1 6 8 1 2 [4,] 8 6 4 1 5 made up of decimal numbers, of course. I want to
2009 Jan 14
6
Solaris 10 with xen 3.2 or previous
Hi, Was anyone able to run Solaris 10 10/08 as guest under a HVM domU Debian Etch (xen 3.0.3-1) or current Debian Lenny (xen 3.2-1)? In my case Solaris installation stops after boot kernel ; I can''t see anyhing after grub screen. I know that it is possible using Xen 3.3 (see [1]) but I don''t know if it possible with a previous Xen version Thanks, Álvaro [1]
2016 Feb 25
2
Re: [PATCH] added ntfscat_i api
On 25/02/16 10:54, Richard W.M. Jones wrote: > Apply the attached patch, followed by doing: > > make -C perl clean > ./configure > make > > Rich. > I applied the patch, unfortunately the issue is still present. This is what I get if I run interactive Perl console. DB<1> use Sys::Guestfs Can't locate loadable object for module Sys::Guestfs in @INC
2012 Feb 07
1
Samba 4 git pull error
steve at hh3:~/samba-master> git pull Updating bfc7481..e32ad9b error: Your local changes to the following files would be overwritten by merge: auth/common_auth.h auth/credentials/credentials_ntlm.c auth/credentials/credentials_samba3.c <snip> source3/lib/util_cmdline.c source3/libads/dns.c source3/libads/k Aborting I haven't changed any files under
2017 Sep 24
2
Call for testing: OpenSSH 7.6
On 23 September 2017 at 17:37, Zev Weiss <zev at bewilderbeest.net> wrote: [....] > And now I'm not able to reproduce the failure at all, with or without that > patch. Not sure what could possibly be different (same git commit, same > terminal session/environment, same 'make' command), but repeated attempts > have been fruitless You didn't happen to upgrade
2011 Dec 07
1
Rank samples by breaks in hist and assign result as factor
Hi R users, My goal is to rank my samples according to how they fall out in a histogram with 10 bins to produce a ranking for each sample according to where it falls on the histogram, with a "1" to represent one tail of the hist, a "10" to represent the other tail, and a "5" for the median/mean. I have a number of different data sets to do this with and in all cases