similar to: Is there such a function that can sort a table according to one column?

Displaying 20 results from an estimated 90000 matches similar to: "Is there such a function that can sort a table according to one column?"

2005 Apr 03
3
is there a function like %in% for characters?
like: "a" %in% "abcd" TRUE Thanks.
2005 Mar 17
4
beginner question: how to sort out distinct values from a vector
there is a vector, like: 1, 1, 1, 2, 2, 3, 3, 4, 5, 5, I'd like a function that gives me only 1, 2, 3, 4, 5 thank you
2009 Nov 03
1
creating mulptiple new variables from one data.frame according to columns and rows in that frame
Dear R-helpers, I have a data.frame (bcpe.lat.m) containing 13 countries, ages 0-50yrs per month, and the corresponding mu&sigma (see below). * I would like to limit the age range to include all 12 months for the 1st 5 years and only whole years for all ages thereafter for each of the countries present in the data frame. * I would like to create separate data.frames according
2005 Apr 03
2
how to draw a 45 degree line on qqnorm() plot?
# I can not draw a 45 degree line on a qqnorm() plot, jj <- sample(c(1:100), 10) qqnorm(jj) abline() don't work. Thank you.
2013 Sep 18
1
rbinlist for data.table and specifying the column class
hello, This rbindlist(list(list(a=NA,b=NA),list(a=20,b=FALSE))) returns a b 1: NA NA 2: TRUE FALSE as per the documentation ?rbindlist is there a way to specify the column class of 'a' to be numeric? In actual usage, i wont be able to re-order the 2nd list entry to be the first. I did try
2004 Nov 16
2
beginner's problem in displaying large data
I got a sample data (let's call it sample.data), which is about 2200 by 15. I tried to take a look of all data >sample.data It shows only a part of data that I thought was a corner. It does not really affect my job, but I thought it is nice to have a look of all data. I can see individual records and they are fine. Is this normal because of buffer size or some reasons? Can I use other
2011 Nov 14
2
how to include integrate in a function that can be solved with uniroot?
Hallo, I am trying to define expectation as an integral and use uniroot to find the distribution parameter for a given expectation. However I fail to understand how to define properly the functions involved and pass the parameters correctly. Can anyone help me out? Thanks, Gerrit Draisma. This what I tried: ======= > # exponential density > g <- function(x,lambda){ lambda
2006 Aug 26
1
Capture of iterative integration output
Hello, I am a novice R user and am having difficulty retrieving the values from 21 iterations of the R function integrate. The only way I have found is to do a write.table and then a read.table as shown in the code below. I would rather capture the 21 values inside the braces ( sapply might work, but I can't set it up without getting an error in function) so I could compute the
2004 Oct 14
5
beginner questions: objects and scripts
hi, I got some questions on using R, 1. How do I check and edit definition of an object? for example, >x <- 1:100 then after a while I want to check how x is defined. list(x) or whatever functions I know only list its content, but I want to see its definition, without scrolling up and down, and edit it like "fixing" a function. 2. How to save my work in current session as a
2004 Dec 05
1
how to calculate "conditional" mean?
a data set like this: year month day count 2001 1 1 10 2001 1 2 11 .... 2004 7 17 8 .... basically it is a count of of some numbers everyday through a few years now I'd like to get the mean of the count for every day. I thought I can do this using for and ifelse, but is there a simple way to do this? I wish a
2010 May 11
2
Problems plotting date and time column from excel using R
I am using R to read from an excel(csv) file. Within the excel file is a column with the date set that looks likes this: 53:40.2 and in the Insert function box it looks likes this: 9/21/2006  4:53:40 PM I tired separating the time and date using the function below and then plotting again which fail to read properly =TEXT(B2,"hh:mm:ss")   and  =TEXT(B9,"mm/dd/yyyy")   The
2005 Nov 16
6
nlme question
I am using the package nlme to fit a simple random effects (variance components model) with 3 parameters: overall mean (fixed effect), between subject variance (random) and within subject variance (random). I have 16 subjects with 1-4 obs per subject. I need a 3x3 variance-covariance matrix that includes all 3 parameters in order to compute the variance of a specific linear
2008 May 19
2
how can i sort a column of data.frame ?
i have a data.frame with several columns that i want to sort one of them (one column) by descending order in such way that this sorting out recover all colums. what should i do? -- View this message in context: http://www.nabble.com/how-can-i-sort-a-column-of-data.frame---tp17324725p17324725.html Sent from the R help mailing list archive at Nabble.com.
2005 Feb 08
3
logistic regression
Hi, I'm using glm function to do logistic regression and now I want to know if it exists a kind of R-squared with this function in order to check the model. Thank you.
1999 Aug 30
3
using underscore character in column names
Suppose you're reading data from a file in which the column names contain underscore characters. Example: ------ start of file ----- pos_x pos_y 1.0 0.0 2.0 1.0 ------ end of file ------- Using read.table, I can read this file just fine: > data <- read.table (file="data", head=T) > data pos_x pos_y 1 1 0 2 2 1 > However, I can't
2009 Nov 06
0
Is there a function that can test if a path is in a directory or one of its sub-directory (recursively)?
On Fri, Nov 6, 2009 at 12:49 AM, Gabriel Genellina <gagsl-py2 at yahoo.com.ar> wrote: > En Fri, 06 Nov 2009 00:53:14 -0300, Chris Rebert <clp2 at rebertia.com> > escribi?: >> >> On Thu, Nov 5, 2009 at 7:41 PM, Peng Yu <pengyu.ut at gmail.com> wrote: > >>> I looked though the os.path manual. I don't find a function that can >>> test if a
2009 Mar 16
3
sort data frame columns according to a list
HI,   I have searched the R-help achive, trying to find a way to sort columns in a data frame according to a specific list, but not be able to find a general way to do it.   My data frame contains columns, with each one named from a sample ID, and each sample was measured in a specific time, generating one column of data, now I would like to sort the columns according to the time course, so I have
2006 Jun 07
4
R crashes on quantreg
I was trying "quantreg" package, lm1 <- lm(y~x) rq1 <- rq(y~x) plot(summary(rq1)) #then got a warning says singular value, etc. but this line can be omited plot(lm1) #crash here It happened every time on my PC, Windows XP Pro Serv. Pack 1, Pentium(4) 3.00G. [[alternative HTML version deleted]]
2012 Jul 12
1
apply() to a function that has more than 2 arguments
Dear all, I created a function which it has many arguments i.e. Mu(x, Y, B, X, P) where Mu is the function. This function works perfect but when I am trying to use it in the apply() function in the manner apply(Matr, 1, Mu, Y=y, B=b, X=x, P=p) it does not work and the output is: Error in match.fun(FUN) : '1' is not a function, character or symbol When I transform the function Mu to have
2011 Oct 03
1
Sorting data in R according to the header of another table
Hi everyone, My (simplified) problem is the following one: I have two tables. The first table contains 5 columns with 5 values and the second table contains a single value for each vector name of the first table (see tables below): Table 1: A B C D E 1 2 3 4 5 2 3 4