Displaying 20 results from an estimated 20000 matches similar to: "Sorting problem"
2002 Sep 30
5
Chi-Square Distribution Plots
Dear list
I have a vector of values that allegedly have a chi-squared distribution. I
want to create a plot that shows the values I have obtained, and the
chi-squared distribution curve for the specified number of degrees of freedom
to show what should have been obtained.
At the moment I am plotting the values I have obtained as a histogram and
somehow want to put on to this plot the
2002 Oct 14
2
Vector of quantiles
I have a quick question which is very simple but I seem to have a mental
block!
I'm using the pchisq function to specify a Chi Squared distribution with 9 df
which I'm then going to use in the Kolmogorov-Smirnov Test to test some
simulated values.
so simply: pchisq(q, df=9)
I know that q is the vector of quantiles but could anybody tell me what
exactly this vector needs to contain?
2002 Sep 30
2
Memory problem
Dear list
I am running a data simulation, which is needed to simulate up to a million
pieces of data.
I am getting the following memory error :
Error: cannot allocate vector of size 11 Kb
In addition: Warning message:
Reached total allocation of 255Mb: see help(memory.size)
I am running a PC with 256Mb RAM and R seems to be taking up the entire
allocation and is still not able to do the
2002 Oct 25
1
Quantil-quantile plot help
Dear list
I am using the qq.plot command to create quantile-quantile plots. The plot
should display a 45 degree reference line upon which the points of the graph
should fall if the two distributions being examined are roughly equal.
If I try:
x<-rchisq(100, df=6)
qq.plot(x, dist="chisq", df=6)
Then I get a quantile plot which has an intercept of roughly 1 when the line
should be
2002 Sep 10
2
Problems with rbind
Dear list
I have a simple question that I have a mental block on:
Having used a loop (from i = 1 to n) to assign some numerical values to
row.list[[i]]
e.g. row.list[[3]]= 0 1
I am wanting to combine the output into a simple matrix.
for example, if I combine the output from persons 1 to 3 into a matrix, I
thought I could do :
h<-rbind(row.list[[1]]:row.list[[3]])
However, I get the
2002 Sep 03
1
Bindata package problems
Dear list
I am having a couple of problems with the package 'bindata'.
Having installed it using install.packages("bindata"), I am finding that
when I load it up as a library I get the following errors:
> library(bindata)
Loading required package: e1071
Loading required package: mvtnorm
Warning messages:
1: There is no package called `e1071' in: library(package, char
2002 Nov 27
6
Rbind help needed
Dear list
I have a very simple question which is causing me problems!
I have a matrix A and simply want to rbind this matrix together n times (n is a large number)
How can I write this in R?
I know I could do new<-rbind(z,z,z,...z) with z written n times but this will take forever as n is so large.
Is there a simple way to write this?
Cheers
Mick
2003 Aug 12
3
Sorting a dataframe
Undoubtedly a simple question:
I've looked at order() and sort() in the help pages for
R1.7.1. It doesn't appear that these functions are immediately
suited to doing the same thing as
PROC SORT DATA = BLAH;
BY X Y Z;
RUN;
in SAS. I have also checked Frank Harrell's Hmisc library.
Could someone point me in the right direction so I can sort
by the levels of Z within the levels of
2002 Jul 10
2
sorting matrices
how can i sort a matrix by sorting the first colloum in ascending order
and have the values of the other colloums in the relative position to
the sorted values.
thanks for help
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or
2005 Feb 21
3
Sorting a matrix on two columns
Hello,
If a matrix with 5 columns has been defined and the first two columns
need to be sorted in ascending order, how can this be achieved whilst
ensuring the
other 3 columns data are in relative position to the sorted columns?
Glen Jones
[[alternative HTML version deleted]]
2005 May 19
2
R matrix sorting question
Dear there,
I am trying to do the following stuff. Could you let me know how to do
it efficiently?
> aaa
[,1] [,2]
[1,] 1 -0.2
[2,] 3 0.8
[3,] 4 0.3
[4,] 5 0.2
[5,] 7 0.9
And I would like to sort the matrix by column 2 (and accordingly column 1
sorted as well).
The desired matrix will be
1 -0.2
5 0.2
4 0.3
3 0.8
7 0.9
If using Excel or SAS, I can
2002 Sep 12
1
Problem with indexing
Dear List
I am having a bit of a problem getting a program to work.
For each of i=1 to n persons I have a matrix (different for each person) with
m rows.
What I want to do, is create m new data sets such that the first is made up
of the first row for each person from the original matrices, the second
contains the second row for each person from the original matrices etc etc up
to the mth
2005 May 16
2
Fitting Contour to Data Points
Apologies for the mass mailing today!
I am attempting to produce a contour plot for phsical data on a map
matrix. I have a small number of data points which each has an (x,y)
co-ordinate together with a corresponding value which I would like to
cvreate a contour plot for.
I have tried the following code:
contour(data$x,data$y,data$value)
but am told:
Error in contour.default(data$x, data$y,
2011 Jun 07
1
Sorting a data frame with values of different lengths
Hi all,
I am attempting to run a script in which I permute my data and run a
Wilcoxon rank sum test on the data 1000 times and compare my original test
statistic to the permuted test statistics to more accurately estimate a
significance level for the trends I am observing.
In the process of doing this, I need to sort a data frame that measures 3 x
1001 based on the value of the test statistic
2012 May 30
2
Sorting a data set
I am a novice user of R and am stumbling on how to order a dataset
produced during my session.
I have a 1863 row X 14 column dataset that I want to put out to a file.
I want the output sorted by the first column and then by the second
column both in ascending order. The first column is character and the
second is numeric (I hope). I used an "as.numeric" function to assign
that
2003 Sep 11
2
Sorting
What is the best way to sort a dataframe?
For example, how would I go about sorting a dataframe (with variables V1-V5)
by ascending V1, V2 and descending V3 while retaining V4 and V5.
Also, is there a relatively easy way by which to re-order my columns?
Thank you for your time.
Marc
Marc Zodet
[[alternative HTML version deleted]]
2009 Aug 10
1
Sorting text docs based on document meta values in tm()
Hi all,
I wonder if there's any way to reshuffle the text collection by the document
meta values. For instance, if I have 5 documents that correspond to the
following meta data:
MetaID Sex Age
0 M 38
0 M 46
0 F 24
0 F 49
0 F 33
Can I reorder the text documents based on the ascending order of age? Thank
you very much!!
--
View
2006 Apr 06
1
Sorting problem
R-gurus...
I've got a 5 column dataframe where I'd like to plot each ID's "b"
against "c" with "b" in ascending order (within the same ID). How do I
sort "b" so that the other variables are altered equally?
ID a b c d
101 1 240 26.7 21.85
101 2 335 21.8 21.85
101 3 1387 26.6 21.85
101 4 877 24.1 21.85
2011 Jan 11
1
sorting question
Hi,
I have a data frame with variables a, b, c (character vars) and t (time var,
could be represented as POSIXct or character, depending on which is most useful.
The format is "yyyy-mm-dd hh:mm:ss CET"). Now, I want to sort the data frame in
ascending order by a, b, c and then in descending order by t.
Here's what I've got, but I'm not sure how to put the
2007 Nov 18
1
how to sort a data.frame by ascending some columns
Dear list,
I have a data frame (238304 rows and 6 columns). I want the data frame
sorted by two columns in ascending order. I am showing
the first 5 rows of the data frame
> clones.info[1:5,1:6]
USER_CLONE_ID CHROMOSOME Expr1002 KB_POSITION Allele_A WELL_ID
1 SNP_A-1855402 17 41419603 41419603 C rs17572851
2 SNP_A-4249904 17 41420045 41420045 A rs17572893
3 SNP_A-2174835 18 41407760