similar to: How do you sort a data frame on a selection of columns?

Displaying 20 results from an estimated 20000 matches similar to: "How do you sort a data frame on a selection of columns?"

2004 Aug 19
3
Do you know if you can map a large minimum spanning tree in R?
Thanks Mike. My data has longitude and latitude coords and I used distAB {clim.pact} then mst {ape} to calculate my minimum spanning tree. The nodes are telecoms sites from all over Australia. My goal is to determine the minimum cost of linking them via cabling, and I'm starting by calculating the distance "as the crow flies", but will probably eventually need to calculate the
2005 Aug 02
6
can we manage memory usage to increase speed?
Hi, Thanks for reading. I am running a process in R for microarray data analysis. RedHat Enterprise Linux 4, dual AMD CPU, 6G memory. However, the R process use only a total of <200M memory. And the CPU usage is total to ~110% for two. The program takes at least 2 weeks to run at the current speed. Is there some way we can increase the usage of CPUs and memories and speed up? Any
2005 Apr 15
2
Help with "MERGE" gratefully accepted
Hello How do I use function 'MERGE" to combine the FILE A and FILE B below to make FILE C? Thank you FILE A 140 151 167 30.1 11.4 40 FILE B 140 167 5.7 30.3 FILE C 140 151 167 30.1 11.4 40 5.7 NA 30.3
2004 Feb 05
2
Histograms by two factors
Hi I am trying to print out means, STDs and histograms under two sets of factors. I can manage it for one set - see below but not for two sets. That is, I want ot print out the mean STD and Histogram for each ITEM code within each DELIVERABLE code. In addition I can only get to view the histogram for the last item. How do you get R to stop overriding the histogram for eg level 1 for factor 1
2004 Aug 03
1
How does R vary from SAS?
Hello I have to show that R has more functionality than SAS for MonteCarlo type exercises involving matrix algebra. As I has little experience with SAS is anyone able to help. I have a model written in R but the IT world in this company is not familiar with R and wants to use something like SAS. thanks
2010 Mar 05
2
Selecting rows of a matrix based on some condition on the columns
The data set consists of two sets of matrices, as labelled by the columns, T's and C's. > xy x T1 T2 T3 T4 T5 C1 C2 C3 C4 C5 [1,] 50 0.00 0.00 33.75 0.00 0.00 0.00 36.76 0.00 35.26 0.00 [2,] 13 34.41 0.00 0.00 36.64 32.86 34.11 35.80 37.74 0.00 0.00 [3,] 14 35.85 0.00 33.88 36.68 34.88 34.58 0.00 32.75 37.45 0.00 [4,] 33 34.56
2005 Jan 07
6
coercing columns
Dear all, I have a data frame that looks like this: c1 c2 c3 A B C B C A A A B and so on; I?d like to produce one single vector consisting of the columns c1,c2, c3, such that vector=("A","B","A","B","C","A","C","A","B") I guess it?s easy to do but I don?t know how...Can anyone
2007 Nov 22
1
Summary: Process multiple columns of data.frame
Thank you Jim Holtman and Mark Leeds for your help. Original question: >How do I do the following more concisely? > Bout[is.na(Bout$bd.n), 'bd.n'] <- 0 > Bout[is.na(Bout$ht.n), 'ht.n'] <- 0 > Bout[is.na(Bout$dbh.n), 'dbh.n'] <- 0 >. . . Solution: for (i in c('bd.n', 'ht.n', 'dbh.n')) Bout[is.na(Bout[[i]]), i] <- 0 Toy
2010 Jan 08
3
Print data frame as list including row/column name
Hi all, I have the following problem: I have a data frame (actually it is a prop.table) which I want to print as a list, e.g.: C1 C2 C3 R1 0.0 0.0 1.0 R2 1.0 0.0 0.0 R3 0.0 0.0 0.0 R4 0.0 1.0 0.0 should be printed like C1;R1;0.0 C2;R1;0.0 C3;R1;1.0 C1;R2;1.0 C2;R2;0.0 ..... Is there any existing solution out there or could somebody please give me a hint on how to
2009 Feb 02
2
concatenating 2 text columns in a data.frame
Hi, I'm trying to concatenate values from two columns in a data frame. For example, I have the following data.frame: C1 C2 C3 C4 C5 A B *F C* Q G H *I J* T K D *R S* E P L *M N* O I'd like to concatenate text from columns C3 and C4, to yield either a list or vector, like so: NewCol FC IJ RS MN Is this feasible in R? Thanks!
2012 Apr 04
2
Selecting obs within groups defined by 2 variables
Hello, I am relatively new to R, and I am trying to select the last observation within a group, where the group is defined by two variables. One of the variables is a date. In the below example, C3 varies within C2, which varies within C1. I need to select the last observation in C3 for 4 groups (C1*C2): 1x, 1y, 2x, and 2y. In my real dataset, C2 is a date (mm/dd/yy) C1 C2 C3 1 x 1 1
2015 Dec 19
2
[PATCH] nvc0: add hardware ETC2 and ASTC support where possible
These are supported on GK20A and GM107. Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> --- Was a bit torn on where to place the enums... we're about to gut all the xml definitions so this seemed appropriate for now. Tested on GK20A only. src/gallium/drivers/nouveau/nv50/nv50_formats.c | 64 +++++++++++++++++++++++++ src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 10 ++++
2012 Nov 08
3
Extracting columns
Hi, I have 22 files (A1, A2, ..., A22) with different number of columns, totaling 10,000 columns: c1, c2, c3, ..., c10000 I have another file with a list of 100 columns that I need to extract. These 100 columns are distributed in 22 files. How to extract the 100 columns of the 22 files? I have done it "manually" with the following commands, for example: cromo1 = read.table ("~
2016 Feb 15
1
[PATCH 09/23] nv50-: separate vertex formats from surface format descriptions
Why not fix the new names instead to be like the old names? Seems like that would be way simpler... On Feb 15, 2016 12:38 AM, "Ben Skeggs" <skeggsb at gmail.com> wrote: > From: Ben Skeggs <bskeggs at redhat.com> > > We've previously had identical naming between vertex and texture > formats, so it mostly made sense to define these together. > > However,
2013 Mar 14
2
Modifying a data frame based on a vector that contains column numbers
Hello! # I have a data frame: mydf<-data.frame(c1=rep(NA,5),c2=rep(NA,5),c3=rep(NA,5)) # I have an index whose length is always the same as nrow(mydf): myindex<-c(1,2,3,2,1) # I need c1 to have 1s in rows 1 and 5 (based on the information in myindex) # I need c2 to have 1s in rows 2 and 4 (also based on myindex) # I need c3 to have 1 in row 3 # In other words, I am trying to achieve this
2005 Apr 29
2
Iterative process for reading in text files
Hello Instead of reading in group1.txt I want to read in groups1 for the first iteration of i, then groups2 for the second and so on. Obviously I can't use groups(i) but assume there is a way to do this. group<-read.table("C:/Data/April 2005/group1.txt",header=T) thanks in advance Meredith
2012 Jan 27
1
multiple column comparison
Hello, I have a very large content analysis project, which I've just begun to collect training data on. I have three coders, who are entering data on up to 95 measurements. Traditionally, I've used Excel to check coder agreement (e.g., percentage agreement), by lining up each coder's measurements side-by-side, creating a new column with the results using if statements. That is, if
2006 Jan 26
3
How do you convert this from S Plus to R - any help appreciated . thanks
exportData(MU.Cost,paste("C:/RAUDSL/S",as.character(MU.Cost$Run.Id[1])," .",as.character(MU.Cost$MU.Id[1]),".MU.PRICE.OUTPUT.txt",sep=""),append = FALSE,type="ASCII",quote=FALSE) [[alternative HTML version deleted]]
2010 Dec 01
3
RFC: sapply() limitation from vector to matrix, but not further
sapply() stems from S / S+ times and hence has a long tradition. In spite of that I think that it should be enhanced... As the subject mentions, sapply() produces a matrix in cases where the list components of the lapply(.) results are of the same length (and ...). However, it unfortunately "stops there". E.g., if you *nest* two sapply() calls where the inner one produces a matrix, very
2008 Dec 10
1
xyplot sorted by date
Hello I have a dataframe with 3 columns C1, C2 and C3. C1 and C2 are numerical data and C3 is the date of the data (format : %Y-%m-%d %H:%M:%S") With the lattice package, I would like to plot C1 as function of C2 sorted by the dates, that is something like : xyplot(C1 ~ C2 | as.Date(C3)) It plots somethings but not the truth. I have compared the output with the output of this script