similar to: sorting a data frame by rownames

Displaying 20 results from an estimated 1000 matches similar to: "sorting a data frame by rownames"

2007 Feb 01
2
Losing factor levels when moving variables from one context to another
Hi, there I'm currently trying to figure out how to keep my "factor" levels for a variable when moving it from one data frame or matrix to another. Example below: vec1<-(rep("10",5)) vec2<-(rep("30",5)) vec3<-(rep("80",5)) vecs<-c(vec1, vec2, vec3) resp<-rnorm(2,15) dat<-as.data.frame(cbind(resp, vecs))
2008 Jul 06
2
Issue with postscript figures using WinAnsi encoding
Hi there, I've hit a bump in writing postscript files with special characters in the WinAnsi encoding on a windows machine. Here's some sample code: ########################################### postscript(file = "test.eps", encoding="WinAnsi.enc", width = 3, height = 5.5, onefile = TRUE, horizontal=FALSE, family = "sans", title =
2008 Jul 09
1
matplot help
Hi, My question is how do I gain control over what values the X and Y axis show. Below is a sample plot I have made and want the X axis to represent a time vector with values taking the form Q1.60, Q2.60, Q3.60...Q1.90..etc...Currently the X axis starts with value 0 and increases by 1 through the end of the sample. win.graph() matplot(v.0,log.diff.v.6,type="l",lty=1, col=2,
2008 Jul 15
2
extracting elements from print object of Manova()
Hi there, Does anyone know how to extract elements from the table returned by Manova()? Using the univariate equivalent, Anova(), it's easy: a.an<-Anova(lm(y~x1*x2)) a.an$F This will return a vector of the F-values in order of the terms of the model. However, a similar application using Manova(): m.an<-Manova(lm(Y~x1~x2)) m.an$F Returns NULL. So does any attempt at calling the
2010 Feb 03
3
How to flatten a tree (based on list) to a certain depth?
Suppose that I have the following list of lists of frames 'root' (let's call it a 'tree' of frames). I want to flatten it to be a list of frames. However, if I unlist(root), it will flatten the frames as well. Is there a simply way to flatten the tree to certain depth? aframe1=data.frame(x=1:3,y=1:3) aframe2=data.frame(u=7:9,v=11:13) aframe3=data.frame(p=3:5,q=6:8)
2008 Jul 15
1
manipulating (extracting) data from distance matrices
Hi all, Does anyone have any tips for extracting chunks of data from a distance matrix? For instance, if one was interested in only a subset of distance comparisons (i.e., that of rows 4 thru 6, and no others), is there a simple way to pull that data out? >From some playing around with an example (below), I've been able to figure out that a distance matrix in R is stored as a single
2006 Nov 01
1
How to rsync only specified subdirectories in the source folder?
Hi all, For example,if there is ten subdirectories named sub1~sub10(each including subdirectories and files too),and file1~file10,how can I rsync only sub2 and sub 3 to the target? /---- MyFolder |---------- sub1 |---------- sub2 |---------- sub3 |---------- sub4 |---------- sub5 |---------- sub6 |---------- sub7 |---------- sub8 |---------- sub9
2016 Aug 23
2
How to describe the RegisterInfo?
Yes, the arch is just as you said, something like AMD GPU, but Intel GPU don't have separate register file for 'scalar/vector'. In fact my idea of defining the register tuples was borrowed from SIRegisterInfo.td in AMD GPU. But seems that AMD GPU mainly support i32/i64 register type, while Intel GPU also support byte/short register type. So I have to start defining the registers from
2007 Feb 12
1
Trying to replicate error message in subset()
Hi, there I am trying to replicate an error message in subset() to see what it is that I'm doing wrong with the datasets I am trying to work with. Essentially, I am trying to pass a string vector to subset() in order to select a specific collection of cases (i.e., I have data for these cases in one table, and want to select data from another table that match up with the cases in the
2007 Jan 23
1
How to evaluate an lm() object for generating warning statement in a function
Hi, there I tried this post on R-help but did not generate any replies, so I thought I might try the waters here since it's a more programming-based group. I have written a function that will allow me to calculate the variance components for a model II (random effects) single factor ANOVA (perhaps this is me re-inventing the wheel, but I handn't yet come across anything in R that does
2014 Oct 14
1
Do subroutines need their own h extension?
Hi all, According to the documentation ( http://www.voip-info.org/wiki/view/Asterisk+h+extension): Be aware: Macros require their own h extension as they do not make use of the calling context's h extension! Does this apply to subroutines too? I am unable to find the corresponding explanation. If not: what happens when a call is hanged-up during the execution of a subroutine? Is the h
2010 Jun 01
1
loop
Can any one help it will be very kind, loop statements I have this table and some more records, I want to reshape it V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 TP53 Dis1 Dis2 Dis3 Dis4 Dis5 Dis6 DCI New1 New2 New3 New4 FDI Hi2 H3 H4 GHD I1 I3 I4 I5 I6 I7 I8 I want my new table or matrix to be some thing like this V1 V2 V3 Tp53 Dis1 Dis2 Tp53 Dis1 Dis3 Tp53 Dis1 Dis4 Tp53 Dis1 Dis5 Tp53 Dis1 Dis6 Tp53 Dis2
2016 Aug 23
2
How to describe the RegisterInfo?
Hi Escha, Great to have your comment! Do you have any specific reason for not doing like this? I am not sure whether I understand your point correctly. For "just model one thread", do you mean "only considering ONE of the 8/16 working lanes that running in lock-step way"?? For my case, may be something like I only need to define r0~r127 as register for i32 register (each r#
2003 Jun 30
3
if else statements in R
Hi, there I am a grad student struggling to get my syntax right in a model I am building in R. I am trying to specify a variable,W, in a loop, such that on the first iteration, it is equal to Wo, my starting value, which I have already specified with Wo<-9.2 On any other iteration other than the first, I want W to equal the previous value of W in the iteration. plus an increment from
2008 Jul 15
4
Iterations
I have a command that reads in some data: x <- read.csv("Sales2007.dat", header=TRUE) Then I try to organize the data: sc <- split(x, list(x$Category, x$SubCategory), drop=TRUE) Then I want to iterate through the data. I was able to get the following to run on the R console: for(i in 1:length(sc)) { sum(sc[[i]]$Quantity) } But notiing is primted on the console. I find
2008 May 09
3
Query: how to add quotes when importing a txt file
Dear R users, I have a txt file of the form 10092007 24.62 24.31 24.90 11092007 19.20 23.17 22.10 13092007 24.71 27.33 23.10 14092007 27.33 27.90 24.10 15092007 28.22 28.55 24.30 16092007 28.53 29.24 27.40 17092007 24.19 30.64 26.80 18092007 22.60 20.62 28.40 19092007 8.89 1.70 14.70 20092007 21.27 2.92 17.30 21092007 22.38 24.72 8.80 22092007 23.94 24.73 20.40 23092007 25.33 25.12 22.60
2009 Nov 27
2
using reshape to do ANOVA mixed models
Hi, I just started with R and I found that there are many options to rearrange the data to do mixed models. I want to use the reshape function. I have 2 between subject variables and one within. I was able to change the data structure but still - the result of the aov functions are calculating everything as a within subject. the table looks like this: SerialNo breed treatment distance_1
2002 Feb 13
3
xtabs
Hi, In Splus if I call the function crosstabs() the output is a contigency table; in each cell of the table is printed: N, N/RowTotal, N/ColTotal, N/Total. N is the number of observations in each cell. The same call to xtabs() in R will produce the contigency table but the only entry in each cell is N. How can I get the same relative frequencies that crosstabs() gives? Thanks, mike --
2004 Jul 29
1
Kudos to the R support team
Hi there, I just wanted to take a quick second to thank everyone who maintains this service- just in case you don't hear it enough, there are a plethora of people who rely on this service (as evidenced by the help archives), and even if they don't say it, are greatly thankful for what you do here. Not only are you providing a service to people who are learning R, but indeed helping
2013 Nov 16
16
[PATCH] BTRFS-PROG: recursively subvolume snapshot and delete
Hi All, the following patches implement the recursively snapshotting and deleting of a subvolume. To snapshot recursively you must pass the -R switch: # btrfs subvolume create sub1 Create subvolume ''./sub1'' # btrfs subvolume create sub1/sub2 Create subvolume ''sub1/sub2'' # btrfs subvolume snapshot -R sub1 sub1-snap Create a snapshot of