similar to: find and replace

Displaying 20 results from an estimated 300 matches similar to: "find and replace"

2012 Aug 31
7
splits with 0s in middle columns
Hi, A column of my df looks like A 10/20/30 40/20 60/10/10/5 80/10 I want to split it such that the last column has the last composition and if there are not enough the middle columns get the 0s. That way my df would look like A1 A2 A3 A4 10 20 0 30 40 0 0 20 60 10 10 5 80 0 0 10 How can I do that ?? [[alternative HTML version deleted]]
2012 Aug 28
7
check and verify
Hi, I have 6 columns in my dataframe (test) A B C D E F a b c d 40 30 a f a b 20 10 x m y m 50 30 If character value in column A matches with that in column C, it gets the percentage in column E, similarly if value in column B matches the value in D, it gets the percentage in F column. If it doesn't match, it gets 0 percentage. How can I do that ? thanks [[alternative HTML version
2012 Aug 16
8
How to extract from a column in a table?
Hi, I have a table in which one column has the name of the objects as shown below. Name Budlamp-Woodcutter Complex - 15 to 60% slope (60/25/15) Budlamp-Woodcutter Complex - 15 to 60% slope (60/25/15) Terrarossa-Blacktail-Pyeatt Complex - 1 to 40% slope (40/35/15/10) Terrarossa-Blacktail-Pyeatt Complex - 1 to 40% slope (40/35/15/10) How can I split the single column into three columns
2012 Aug 29
4
Use or ??
Hi, My data frame looks like A B C a b a x y z I want to add a new column which says "y" if either A or B matches with C and "n" if there is no match. How can I do that? Thanks [[alternative HTML version deleted]]
2012 Aug 20
7
relating data in two data frames
Hi, My data.frame "A" has FID like this FID a a b b b c c d d d d Now my second data.frame "B" has age value for a, b, c, d like FID Age a      5 b      7 c      9 d      3 How can search for the Age column in "B" and replace the values in "A" so that my new "A" looks like this FID Age a      5 a      5 b      7 b      7 b      7
2012 Aug 27
4
?nchar ?strsplit
Hi, my data frame is x<-data.frame(ID=c("abc/def","abc/def/ghi","abc","mno/pqr/st/ab")) I want to split my column ID using "/" as the place to split. How can I do that without telling the code how many sub-columns. I could use nchar(gsub("[^/]","",x$ID)) to get how many "/" are in each row of the column, but could
2012 Oct 02
2
add values in one column getting range from other column
Hi, My dataframe has two columns one with area and other with percent. How can i add the areas that are within a range of percentage?? My dataframe looks like Area Percent 456       0 3400      10 79          25 56           18 467         0 67          67 839        85 1120      0 3482      85 I want to add the area for values whose percent is <0, 0-25, 25-50, 50-75, >75. How
2003 Oct 29
2
importing SAS data
I am trying to import a permanent SAS data set using read.ssd in the foreign library. I get the following error: > list.files("C:/temp") [1] "newdat1.sas7bdat" "snpm1.sas7bdat" "test1.sas" > library(foreign) > newdat1 <- read.ssd("C:/temp","newdat1") SAS failed. SAS program at
2008 Jun 12
3
Adding new columns to (output) data - e.g., read 5 cols write 8
Hello, I have the following task I'd like to accomplish: A file contains 5 columns of data (several hundred rows), let's call them a, b, c, d and e (ie these are their column headers) I also have a set of definitions, e.g., f = a + b g = a * 3 h = c + d etc. I would like to write out a new .rda file that contains columns a b c d e f g h etc. I.e. , the original data plus new columns
2009 Nov 05
2
Merge records in the same dataframe
Hi: Suppose that I have a data frame as below x1 x2 x3 ... x10 wk1 wk2 ... Wk208 (these are the column names) For each record, x1, x2, x3 ... x10 are attributes. and wk1, wk2, ..., wk208 are the sales recoreded for this attribute combination. Suppose that now, that I want to do the following 1. Merge the data frame so that I have a new data frame grouped by values of x2 and x3 (for example).
2007 Jul 04
1
kvm developers' forum 2007
We's like to invite all of you to attend the first annual KVM Forum 2007. Please click here http://www.qumranet.com/KVMForum2007.php to be taken to the event site where you can learn more about the KVM Forum 2007 and register online. Hosted by the KVM Developer Community, the purpose of the forum is to bring together developers, testers and other technical individuals from within the community
2007 Jul 04
1
kvm developers' forum 2007
We's like to invite all of you to attend the first annual KVM Forum 2007. Please click here http://www.qumranet.com/KVMForum2007.php to be taken to the event site where you can learn more about the KVM Forum 2007 and register online. Hosted by the KVM Developer Community, the purpose of the forum is to bring together developers, testers and other technical individuals from within the community
2004 Jul 21
3
How to sort TWO columns ?
Dear ALL, I fear my question has already been answered many times before, but I haven't fund that in archives... I am working on spatial datasets and, in most arrays I'm handling, there are two columns dedicated to (x,y)-coords. For different reasons - notably to draw image() plots, I need to have these two columns sorted in increasing order. But sort() and order() seem to apply to
2005 Dec 22
1
strsplit with dataframes
Hello fellow R people, I can not figure out a pretty way to use strplit with vectors Imagine that I got the following data from someone with ID's representing several factors ID data A1-B1-t1 0 A1-B1-t2 1 A1-B2-t1 5 A1-B2-t2 10 A1-B10-t1 0 A1-B10-t2 1 A1-B20-t1 5 A1-B20-t2 10 ... I would like to turn this dataframe to station substation time data A1 B1 t1 0 A1 B1 t2 1 A1 B2 t1 5
2009 Jul 25
1
regex expression to select row or column
I have a multidimensional data which looks like the following: "S1-a" "S2-b" "S3-c" "S4-d" "S5-a" "S6-b" "S7-c" "S8-d" "T1-A" "T1-B" "T1-C" "T1-D" "T2-A" "T2-B" "T2-C" "T2-D" I read it from csv file and would like to have 16
2004 Dec 31
3
Citation
Does anyone know R is to be cited in a publication? I've looked everywhere on the website and cannot find this. Thanks, Heather -- Heather Maughan Department of Ecology and Evolutionary Biology Biosciences West 310 University of Arizona Tucson, AZ 85701 Phone: 520-626-5108 Fax: 520-621-9190 hmaughan at u.arizona.edu
2008 Jul 10
3
Sorting a matrix
Hi, I want to sort a matrix by a specific variable without changing the row binding between variables. Ex. Name Sex Age Fred M 24 John M 18 Mary F 21 ordered by Age Name Sex Age John M 18 Mary F 21 Fred M 24 Thanks Angelo
2011 Dec 22
3
delete all columns with all values equal to zero
Hello all: I'm sure this is quite simple, but I tried several options and I still can't get I right. I've got a data.frame and I want to delete all columns of which the sum is zero. Any ideas? Thanks, Frederico Mestre [[alternative HTML version deleted]]
2010 Sep 21
3
How to convert a character into a filename?
Dear list, How to convert a character to a filename? such as: x <- "height" # "height" here is actually a name of a colume in a data frame filename <- paste("plant,x") write.csv (data, file="C:/plant/filename.csv) # having trouble with this statement, how to 'write' the filename here? All I want from above is to write 'data' to a file
2006 Jan 05
1
tucson users?
Since Jay posted the thing for Phoenix I''d thought I''d check for Tucson, AZ developers (I only know of one so far). -warner