Displaying 20 results from an estimated 4000 matches similar to: "Randomly rearranging elements of sets"
2010 Feb 18
2
Rearranging data
Hi!
I have just started learning R and today only I have joined this group. This is my first mail and I wish to thank all of you for allowing me to be part of this group.
I have following problem. I have an input.csv file such that
corp_id      date    investment_id       rate
corp1        17-Feb         1                 65
corp1        16-Feb         1                 70
corp1        15-Feb   
2010 Jan 20
2
Matrices with randomly generated entries
I'm attempting to generate matrices where the entries are randomly generated
numbers of specified distribution.
The following code was an attempt to create a 3 by 3 matrix, where my
entries where randomly generated from a uniform (0,1) distribution.
x = matrix(0,ncol = 3, byrow = T)
for(i in 1:3) {
 for(j in 1:3) { x[i,j]= runif(1,0,1) }
}
The problem I get with the above code however is
2009 Jul 13
1
R in rearranging equations
Hi,
can anyone tell me if R can be used to rearrange very complicated equations
in terms of one of the variables?
I have: 
dx/dt = a*b*m*y*(1-x)-r*x
and, having set:
dy/dx = 0, 
need to rearrange in terms of x. The problem I have is that I don't know how
to rearrange equations when the variables are not yet defined (I get
messages warning me that x etc can't be found). I'm not sure
2011 Apr 21
1
Rearranging columns with cbind
I'm getting an error that I don't understand when trying to rearrange my data
columns with cbind. My data is in 27 columns, like so:
> data <- read.table("CalledFeatsNimblegen.csv", header=T, sep=",")
> names(data)
 [1] "MF_not_mC"          "MF_promoter"        "MF_genebody"       
"FF_not_mC"         
 [5]
2006 Jun 23
0
R: rearranging data frame rows
Have a look at merge.
Ciao
Vittorio
>----Messaggio originale----
>Da: 
f.calboli at imperial.ac.uk
>Data: 23-giu-2006 18.10
>A: "r-help"<r-
help at stat.math.ethz.ch>
>Ogg: [R] rearranging data frame rows
>
>Hi 
All,
>
>I have two data frames. The first contains data about a number 
of individuals, 
>coded in the first column with a name, in an order
2003 Feb 05
1
rearranging rows
Dear all,
I am working with a matrix structured as follows
                    Factor 1    Factor2  ...
Country 1
Country 1
Country 2
Country 2
...
Country N
Country N
and I need to rearrange it according to the following scheme
                    Factor 1    Factor2  ...
Country 2
Country 2
Country N
Country N
...
Country 1
Country 1
where countries are ordered accordingly to the average
2007 May 29
2
fullscreen 3D leads to gnome panels rearranging
Hi,
Just wondering if anyone else has seen this behavior?
Today I ran some 3D demos, just for fun (from
http://www.vividimage.enta.net/electrome/) !!!
When the demo ends and gives me back a gnome desktop all my panels icons had
rearranged and ended up at the right hand corner in a tiny clump. 
In windowed mode its fine just full screen.
Any ideas? Should I file a bug report or is this
2006 Jun 23
1
rearranging data frame rows
Hi All,
I have two data frames. The first contains data about a number of individuals, 
coded in the first column with a name, in an order I find convenient.
The second contains different data about the same indivduals, in a different 
order. Both data frame have the individual names in the first column.
I need to reorder the second data frame so the rows are rearranged in the same 
manner as
2011 Apr 21
1
Rearranging PCA results from R
Hi!! 
I'm having trouble selecting 10 out of 41 attributes of the KDD data set. In
order to identify the components with the higher variance I'm using
princomp. the result i get for summary(pca1) is:
                              Comp.1            Comp.2          Comp.3             
Comp.4        Comp.5              Comp.6            Comp.7           Comp.8          
Comp.9          
2008 Jul 31
1
Rearranging Data
Hi everyone,
A few days back Jim helped with out, helping me find an automated way of 
determining the mean and median of intervals between price changes.
However, a new set of data I have is no longer in the same format. 
CDSmod is the file that was used with this code:
x <- read.csv('/cdsmod.csv', as.is=TRUE, check.names=FALSE)
x$Date <- as.Date(x$Date, "%m/%d/%Y")
2009 Jul 17
2
Resolution changes sometimes rearranging desktop
Sometimes when I play games that use a resolution different from my normal X display, the windows on my workspace get shifted over toward the upper left. It's an issue that's been happening for a long while and I'm not sure if this is more of a general X issue or something specific to wine. As far back as I remember, it only happens with wine (0.x-0.9, 1.0, 1.1) and I've seen it in
2009 Sep 17
1
heatmap.2() problems with re-ordering of rows and columns
I have a file of the following form
-11 -10 -9 -8
-10 -9   -8   NA
-9   -7    NA NA
-8    NA  NA NA
So basically a NxN matrix of log scores.  I want to get a heatmap of these
log scores but I'm having a problem. 
I'm using the following code
library(gplots)
data=read.table("filein.txt",header=FALSE)
mat=as.matrix(data)
heatmap.2(mat,dendrogram=c("none"))
But on the
2007 Jun 11
1
Rearranging Capture History Data in R
What code can i use to convert a table like this:
Tag#    Date
1       1
2       1
3       1
4       1
2       2
4       2
1       3
2       3
4       4
Into one like this:
Tag     1     2     3     4 #Date header
1       1     0     0     1
2       1     1     1     0
3       1     0     0     0
4       1     1     0     1
Thanks,
Ben Cox
Research Assistant (M.S.)
Montana Cooperative
2003 Jan 19
0
Rearranging subtrees and Eisen Cluster
I am attempting to replicate what Cluster 3.0 and Treeview (both by Mike
Eisen) to cluster both microarray genes and arrays does using R with
hclust. I basically utilized the plot.mat function in sma library with
some layout() and hclust().
1. Can I know if some has already written such a function or available
in some package.
2. If not, would appreciate if someone could take the time to test
2007 Oct 11
2
Rearranging dataset
Hi all, I have a datasei like this :
   
  ID      Date             Price
  aa     01/01/07       12
  aa    01/02/07         13
  bb     01/01/07        23
  bb    01/02/07        12
   
   
  Now I want to write them in following format :
   
  ID      Date             Price   ID      Date             Price
  aa     01/01/07       12        bb     01/01/07        23
  aa    01/02/07         13  
2010 Feb 20
3
Rearranging a data frame for multiple observations
Hi there,
I think I'm struggling with a fairly simple problem but can't seem to solve
it.  I have multiple observations for one unique identifier.  Ultimately I
want to end up with one line per identifier with multiple observations in
rows. I'm really stuck any help would be really appreciated.
CAO0337134	05/09/95
CAO0337134	27/09/05
CAO0347741	10/10/04
CAO0347741	12/10/04
2011 May 08
2
Rearranging variables in table in non-alphabetical (manually specified) order
Dear all,
I'm trying to rearrange variables in a table in a custum order for using it with levelplot. So far I could only find examples showing how to sort alphabetically. Here is a short example:?
a <- c("Anna","Anna","Michael","Klaus","Klaus","Anna","Fritz")?
b <-
2009 Nov 12
1
Rearranging long tables, Sweave, xtable, LaTeX
Dear R-users,
consider the two following outputs, ## 1 and  ## 2
\begin{Scode}{Setup, echo = FALSE, print = FALSE, eval = TRUE}
 with(expand.grid(Fact1 = 1:3, Fact2 = 1:40), table(Fact1, 
Fact2))                  ## 1
 xtable(with(expand.grid(Fact1 = 1:3, Fact2 = 1:40), table(Fact1, 
Fact2)))     ## 2
\end{Scode}
The first line
with(expand.grid(Fact1 = 1:3, Fact2 = 1:40), table(Fact1, Fact2))
2003 Oct 27
1
packet rearranging questions
Hello again.  If you recall, I am the guy working on enabling Audacity
to losslessly rearrange Ogg Vorbis files for my senior thesis.  I have
more or less completed the required modifications to Audacity to support
this.  You can read more about the work this entailed by reading my
journal:
http://www.reverberate.org/computers/thesis/journal
Now my attention moves to the Ogg Vorbis code
2011 Mar 09
3
Rearranging the data
Dear R helpers,
xx = data.frame(country = c("USA", "UK", "Canada"), x = c(10, 50, 20), y = c(40, 80, 35), z = c(70, 62, 10))
> xx
       country      x     y    z
1      USA        10    40  70
2     
 UK          50   80   62
3     Canada    20   35   10
I need to arrange this as a new data.frame as follows -
country       type     values
USA