search for: id2s

Displaying 20 results from an estimated 217 matches for "id2s".

Did you mean: id's
2010 Apr 29
3
Simple loop code
Hi fellow R Users, I find that I typically rewrite my data specific to data in columns, which is by no means efficient and I am struggling to break out of this bad habit and utalise some of the excellent things R can do! I have tried to look at 'for' but I don't really follow it, and I wondered if anyone could help with a simple example using my script so I could follow this and build
2012 Apr 14
3
Choose between duplicated rows
Dear r experts, Sorry for this basic question, but I can't seem to find a solution? I have this data frame: df <- data.frame(id = c("id1", "id1", "id1", "id2", "id2", "id2"), A = c(11905, 11907, 11907, 11829, 11829, 11829), v1 = c(NA, 3, NA,1,2,NA), v2 = c(NA,2,NA, 2, NA,NA), v3 = c(NA,1,NA,1,NA,NA), v4 = c("N",
2008 Apr 02
1
Quickest way to access data.frame?
Hi, I have tried search around this forum for the best way to access a data.frame.. i got the feeling that "no partial match" is the way to make it fast.... so I convert everything to factor.. but I'm still not 100% sure if the following code will do it... is this the fastest way to do something foreach (ID, ID2) pair? Thanks! data <- data.frame(ID = floor(runif(n = 40000, min=0,
2006 Jan 24
9
Number of replications of a term
Hello, Is there a simple and fast function that returns a vector of the number of replications for each object of a vector ? For example : I have a vector of IDs : ids <- c( "ID1", "ID2", "ID2", "ID3", "ID3","ID3", "ID5") I want the function returns the following vector where each term is the number of replicates for the
2006 Jan 14
3
In place editing and external control
Dear all, First I''d like to thank authors for so nice Scriptaculous and Prototype libraries, which helped me already a lot! I have question regarding externalControl parameter in InPlaceEditor. If I understand correctly, I can use that to have one image as a trigger to enter edit mode? I tried with below code but without success: <span id="id1">My text</span>
2006 Sep 13
3
group bunch of lines in a data.frame, an additional requirement
Thanks for pointing me out "aggregate", that works fine! There is one complication though: I have mixed types (numerical and character), So the matrix is of the form: A 1.0 200 ID1 A 3.0 800 ID1 A 2.0 200 ID1 B 0.5 20 ID2 B 0.9 50 ID2 C 5.0 70 ID1 One letter always has the same ID but one ID can be shared by many letters (like ID1) I just want to keep track of the ID, and get
2013 Apr 12
1
Removing rows that are duplicates but column values are in reversed order
Hi, From your example data, dat1<- read.table(text=" id1?? id2?? value a????? b?????? 10 c????? d??????? 11 b???? a???????? 10 c????? e???????? 12 ",sep="",header=TRUE,stringsAsFactors=FALSE) #it is easier to get the output you wanted dat1[!duplicated(dat1$value),] #? id1 id2 value #1?? a?? b??? 10 #2?? c?? d??? 11 #4?? c?? e??? 12 But, if you have cases like the one
2011 Aug 02
2
Data frame to matrix - revisited
Hi, I've tried to look through all the previous related Threads/posts but can't find a solution to what's probably a simple question. ? I have a data frame comprised of three columns e.g.: ? ID1?ID2?Value a?b?1 b?d?1 c?a?2 c?e?1 d?a?1 e?d?2 ? I'd like to convert the data to a matrix i.e.: ? ?a b c d e a n/a 1 2 1 n/a b 1 n/a n/a 1 n/a? c 2 n/a n/a n/a 1 d 1 1 n/a n/a 2 e n/a n/a 1
2011 Apr 25
2
Problem with ddply in the plyr-package: surprising output of a date-column
Hi Together, I have a problem with the plyr package - more precisely with the ddply function - and would be very grateful for any help. I hope the example here is precise enough for someone to identify the problem. Basically, in this step I want to identify observations that are identical in terms of certain identifiers (ID1, ID2, ID3) and just want to save those observations (in this step,
2008 Jul 09
2
Parsing
Dear R users, I have a big text file formatted like this: x x_string y y_string id1 id1_string id2 id2_string z z_string w w_string stuff stuff stuff stuff stuff stuff stuff stuff stuff // x x_string1 y y_string1 z z_string1 w w_string1 stuff stuff stuff stuff stuff stuff stuff stuff stuff // x x_string2 y y_string2 id1
2007 Apr 20
2
Fastest way to repeatedly subset a data frame?
Hi - I have a data frame with a large number of observations (62,000 rows, but only 2 columns - a character ID and a result list). Sample: > my.df <- data.frame(id=c("ID1", "ID2", "ID3"), result=1:3) > my.df id result 1 ID1 1 2 ID2 2 3 ID3 3 I have a list of ID vectors. This list will have anywhere from 100 to 1000 members, and
2005 Aug 10
1
Why only a "" string for heading for row.names with write.csv with a matrix?
Consider: > x <- matrix(1:6, 2,3) > rownames(x) <- c("ID1", "ID2") > colnames(x) <- c("Attr1", "Attr2", "Attr3") > x Attr1 Attr2 Attr3 ID1 1 3 5 ID2 2 4 6 > write.csv(x,file="x.csv") "","Attr1","Attr2","Attr3" "ID1",1,3,5
2010 Jun 03
2
deduplication
Colleagues, I am trying to de-duplicate a large (long) database (approx 1mil records) of diagnostic tests. Individuals in the database can have up-to 25 observations, but most will have only one. IDs for de-duplication (names, sex, lab number...) are patchy. In a first step, I am using Andreas Borg's excellent record linkage package (), that leaves me with a list of 'pairs' looking
2009 Feb 12
3
get top 50 correlated item from a correlation matrix for each item
Hi, I have a correlation matrix of about 3000 items, i.e., a 3000*3000 matrix. For each of the 3000 items, I want to get the top 50 items that have the highest correlation with it (excluding itself) and generate a data frame with 3 columns like ("ID", "ID2", "cor"), where ID is those 3000 items each repeat 50 times, and ID2 is the top 50 correlated items with ID,
2006 Feb 09
1
List Conversion
Hello, I have a list (mode and class are list) in R that is many elements long and of the form: >length(list) [1] 5778 >list[1:4] $ID1 [1] "num1" $ID2 [1] "num2" "num3" $ID3 [1] "num4" $ID4 [1] NA I'd like to convert the $ID2 value to be in one element rather than in two.?? It shows up as c(\"num2\", \"num3\") if I try to use
2012 Aug 03
3
all duplicated wanted
Hi, Has anyone been able to figure out how to print all duplicated observations? I have a dataset, with patients ID, and other lab records. Some patients have multiple lab records, but 'duplicated' ID will only show me the duplicates, not the original observation. How can I print both the original one and the duplicates? Thanks
2005 Nov 09
3
dataframe without repetition
Hello, with a data.frame like this : > toto <- data.frame(id=c("id1","id1","id2","id3","id3","id3"),dpt=c("13","13","34","30","30","30")) > toto id dpt 1 id1 13 2 id1 13 3 id2 34 4 id3 30 5 id3 30 6 id3 30 what is the most efficient ways to obtain : id
2010 Sep 07
1
average columns of data frame corresponding to replicates
Hi Group, I have a data frame below. Within this data frame there are samples (columns) that are measured more than once. Samples are indicated by "idx". So "id1" is present in columns 1, 3, and 5. Not every id is repeated. I would like to create a new data frame so that the repeated ids are averaged. For example, in the new data frame, columns 1, 3, and 5 of the original
2012 Feb 22
1
Lattice and horizontally stacked density plots
Hello, I am try to make a density plot where plots are stacked like the one found here: http://dsarkar.fhcrc.org/lattice/book/images/Figure_14_03_stdBW.png I am facing problems, however. Using the code example below, I'd like to generate a separate panel for each val of id2. Within each panel, I'd like to have individual histograms each on separate lines based on the value of id1. ?Note
2012 Sep 15
5
create new variable with ifelse? (reproducible example)
Dear R users, I have a reproducible data and try to create new variable "clo" is 1 if know variable is equal to "very well" or "fairly well" and getalong is 4 or 5 otherwise it is 0. rep_data<- read.table(header=TRUE, text=" id1 id2 know getalong 100000016_a1 100000016_a2 very well 4 100000035_a1 100000035_a2 fairly