similar to: mean for subset

Displaying 20 results from an estimated 10000 matches similar to: "mean for subset"

2010 Oct 06
3
tapply output
Hello, I am having trouble getting the output from the tapply function formatted so that it can be made into a nice table. Below is my question written in R code. Does anyone have any suggestions? Thank you. Geoff #Input the data; name <- c('Tom', 'Tom', 'Jane', 'Jane', 'Enzo', 'Enzo', 'Mary', 'Mary'); year <- c(2008, 2009,
2010 Apr 02
2
panel data
Hello, I have an unbalanced panel data set that looks like: ID,YEAR,HEIGHT Tom,2007,65 Tom,2008,66 Mary,2007,45 Mary,2008,50 Harry,2007,62 Harry,2008,62 James,2007,68 Jack,2007,70 Jordan,2008,72 That is, James, Jack, and Jordan are missing a YEAR. Is there any command that will "fill in" the missing YEAR such that the end result will be balanced and look like: ID,YEAR,HEIGHT
2016 Dec 31
3
Automatic Insertion of OpenACC/OpenMP directives
Dear LLVMers, we have released a tool that uses LLVM to insert OpenACC or OpenMP 4.0 directives in programs. You can use the tool online here: http://cuda.dcc.ufmg.br/dawn/. Our tool, dawn-cc, analyzes the LLVM IR to infer the sizes of memory chunks, and to find dependences within loops. After that, we use debug information to translate the low-level information back into annotations that we
2011 Mar 08
1
lags for unbalanced panel data
Hello, I was wondering if there was an easy way to calculate the rate of change in a variable for an unbalanced panel data set. Below is a detailed description in R of what I am asking. Thank you. Geoff #Suppose I have the following unbalanced panel data; Person <- c(rep('Frank',5), rep('Tony',4), rep('Edward',4)); Year <-
2016 Dec 31
0
Automatic Insertion of OpenACC/OpenMP directives
Hi, > On Dec 31, 2016, at 8:33 AM, Fernando Magno Quintao Pereira via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Dear LLVMers, > > we have released a tool that uses LLVM to insert OpenACC or OpenMP > 4.0 directives in programs. You can use the tool online here: > http://cuda.dcc.ufmg.br/dawn/. Our tool, dawn-cc, analyzes the LLVM IR > to infer the sizes of
2012 Jul 15
4
Imposing more than one condition to if
Hi,   I have a dataset which contains several time records for a number of days, plus a variable (light) that allows to determine night time (lihgt= 0) and daytime (light> 0). I need to obtain get dusk time and dawn time for each day and place them in two columns. This is the starting point (d): day time light 1     1       20 1     12     10 1     11     6 1     9       0 1     6       0
2012 Sep 10
3
Plot not too dense line plot
Dear all, I am including in a plot 6 different lines (?lines) with 6 different line types. The problem is that I have so dense information that the line types are not visible any more.   In the code below myLength<-length(currentSet) plot(seq(from=1,to=myMax,length.out=myLength),currentSet, type="l",xlim=c(1,myMax),axes=F,...) the myLength is 100.000+ elements. I would like to ask
2001 Aug 21
1
read.table -unexpected truncation of rows
Hello, Are there any 'unallowed' (meta)characters that can cause R to parse a file incorrectly when using read.table? --Dawn Here the background if it's needed: I'm new to R, but have done some Perl. I'm trying to read in a data.frame from a file using * as a record separator. data <- read.table("all_genomes.data",header=T,sep="*") This has
2006 Feb 09
6
inPlaceEditor ISSUES!
I have run into a problem that I have never created before. I am using the scriptaculous inPlaceEditor If I hit the cancel button, and rehit the editor it then creates two textboxes, and if I repeat three input boxes, etc.! Must be stupid simple, but I AM STUMPED! DECO
2008 Apr 02
1
Trouble combining plotmath, bquote, expressions
I'm using R-2.6.2 on Fedora Linux 9. I've been experimenting with plotmath. I wish it were easier to combine expressions in plotmath with values from the R program itself. There are two parameters in the following example, the mean "mymean" and standard deviation "mystd". I am able to use bquote to write elements into the graph title like mu = mymean and R will
2010 May 02
3
percent by subset
Suppose my data looks like this: Obs, Male, Female, Height 1, T, F, 66 2, F, T, 64 3, T, F, 59 4, T, F, 55 5, F, T, 62 6, T, F, 67 7, T, F, 58 8,
2008 Jul 08
6
Question: Beginner stuck in a R cycle
Dear All, I have a database of 200 observations named myD. In the dataframe there are a column named code (with codes varying from 1 to 77), a column named "prevalence" with some quantitative measurements are given and an column named Pr_mean, with no values. I would like to set a cycle to compute the average of prevalence values for each different code and store the averages under the
2017 Sep 22
3
Subset
Super, Thanks On Fri, Sep 22, 2017 at 4:57 PM, Boris Steipe <boris.steipe at utoronto.ca> wrote: > > a <- c("<0.1", NA, 0.3, 5, "Nil") > > a > [1] "<0.1" NA "0.3" "5" "Nil" > > > b <- as.numeric(a) > Warning message: > NAs introduced by coercion > > b > [1] NA NA 0.3
2017 Sep 25
2
Subset
myDF <- data.frame(a = c("<0.1", NA, 0.3, 5, "Nil"), b = c("<0.1", 1, 0.3, 5, "Nil"), stringsAsFactors = FALSE) # you can subset the b-column in several ways myDF[ , 2] myDF[ , "b"] myDF$b # using the column, you make a logical vector ! is.na(as.numeric(myDF$b)) # This can be used to select the
2006 Mar 03
3
Need Authentication Source
Hi there, This is my first post :) I''ve read Agile and Rails Recipes book. Now i''m learning on making a good authentication system and as i read this maillist archive, i''m interested to have a demo source code (any .sit or .zip .tgz .bz2 would be fine, i''m using tiger 10.4.5) for Security Model by Bruce Perens or any other demos (like a part of
2017 Sep 25
0
Subset
Hi, Lets say this was a dataframe where I had two columns a <- c("<0.1", NA, 0.3, 5, "Nil") b <- c("<0.1", 1, 0.3, 5, "Nil") And I just want to remove the rows from the dataframe where there were NAs in the b column, what is the syntax for doing that? Thanks in advance On Fri, Sep 22, 2017 at 5:04 PM, Shane Carey <careyshan at
2017 Sep 25
1
Subset
Always via logical expressions. In this case you can use the logical expression myDF$b != "0" to give you a vector of TRUE/FALSE B. > On Sep 25, 2017, at 8:00 AM, Shane Carey <careyshan at gmail.com> wrote: > > This is super, really helpfull. Sorry, one final question, lets say I wanted to remove 0's rather than NAs , what would it be? > > Thanks >
2008 Dec 07
5
How to force aggregate to exclude NA ?
The aggregate function does "almost" all that I need to summarize a datasets, except that I can't specify exclusion of NAs without a little bit of hassle. > set.seed(143) > m <- data.frame(A=sample(LETTERS[1:5], 20, T), B=sample(LETTERS[1:10], 20, T), C=sample(c(NA, 1:4), 20, T), D=sample(c(NA,1:4), 20, T)) > m A B C D 1 E I 1 NA 2 A C NA NA 3 D I NA 3 4 C I
2013 Nov 20
1
error in install
Hi, I am trying to install R on the Unix system. When I type './configure', it seems many not installed on my computer. The last one is 'configure: error: No F77 compiler found'. Can you tell me where I can get these software before installing R? Thanks! Dawn [[alternative HTML version deleted]]
2017 Sep 25
0
Subset
This is super, really helpfull. Sorry, one final question, lets say I wanted to remove 0's rather than NAs , what would it be? Thanks On Mon, Sep 25, 2017 at 12:41 PM, Boris Steipe <boris.steipe at utoronto.ca> wrote: > myDF <- data.frame(a = c("<0.1", NA, 0.3, 5, "Nil"), > b = c("<0.1", 1, 0.3, 5, "Nil"), >