Re: [R] R - Populate Another Variable Based on Multiple Conditions | For a Large Dataset

2016-07-02 Thread Jeff Newmiller
You are making this hard on yourself by not paying attention the Posting Guide listed in the footer of every email on this list. You would probably also find [1] helpful also. [1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example -- Sent from my phone. Plea

Re: [R] Extracting matrix from netCDF file using ncdf4 package

2016-07-02 Thread Roy Mendelssohn - NOAA Federal
Sending this to Hemant a second time as i forgot to reply to list. Hi Hemant: Well technically the code you give below shouldn’t work, because “start” and “count” are suppose to be of the same dimensions as the variables. I guess Pierce’s code must be very forgiving if that is working. One th

Re: [R] Extracting matrix from netCDF file using ncdf4 package

2016-07-02 Thread Bert Gunter
I know nothing about netCDF files, but if you can download the file and make it an array, extraction via indexing takes no time at all: > ex <-array(rnorm(2*1e4*365, mean = 10), dim = c(100,200,365)) > system.time(test <-ex[35,2,]) user system elapsed 0 0 0 > length(test) [

[R] Extracting matrix from netCDF file using ncdf4 package

2016-07-02 Thread Hemant Chowdhary via R-help
I am working with a 3-dimensional netCDF file having dimensions of X=100, Y=200, T=365. My objective is to extract time vectors of a few specific grids that may not be contiguous on X and/or Y. For example, I want to extract a 5x365 matrix where 5 rows are each vectors of length 365 of 5 spe

Re: [R] R - Populate Another Variable Based on Multiple Conditions | For a Large Dataset

2016-07-02 Thread Kevin Wamae
Hi Jeff, sorry for referring to you as Jennifer earlier, accept my apologies. I attached a sample dataset in the question, am afraid it must have failed to attach. I have attached it again.. Regards --- Kevin Kariuki

Re: [R] Can R read Word fonts and comments?

2016-07-02 Thread boB Rudis
I just added `docx_extract_all_cmnts()` (and a cpl other comments-related things) to the dev version of `docxtractr` (https://github.com/hrbrmstr/docxtractr). You can use `devtools::install_github("hrbrmstr/docxtractr")` to install it. There's an example in the help for that function. Give it a go

Re: [R] R - Populate Another Variable Based on Multiple Conditions | For a Large Dataset

2016-07-02 Thread Jeff Newmiller
I can understand you not wanting to supply your actual data online, but only you know what your data looks like so only you can create a simulated data set that we could show you how to work with. -- Sent from my phone. Please excuse my brevity. On July 2, 2016 2:57:39 AM PDT, Kevin Wamae wro

Re: [R] [FORGED] Splitting data.frame into a list of small data.frames given indices

2016-07-02 Thread Witold E Wolski
Hi Bert, My reply is inline: On 1 July 2016 at 17:02, Bert Gunter wrote: > Inline. > > Cheers, > Bert > > > Bert Gunter > > "The trouble with having an open mind is that people keep coming along > and sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )

[R] R - Populate Another Variable Based on Multiple Conditions | For a Large Dataset

2016-07-02 Thread Kevin Wamae
I have a drug-trial study dataset (attached image). Since its a large and complex dataset (at least to me) and I hope to be as clear as possible with my question. The dataset is from a study where individuals are given drugs and followed up over a period spanning two consecutive years. Individua

Re: [R] trouble double looping to generate data for a meta-analysis

2016-07-02 Thread Michael Dewey
Dear Marietta Comments in-line On 01/07/2016 18:28, Marietta Suarez wrote: i'm trying to generate data for a meta analysis. 1- generate data following a normal distribution, 2- generate data following a skewed distribution, 3- generate data following a logistic distribution. i need to loop this

Re: [R] Difficulty subsetting data frames using logical operators

2016-07-02 Thread John Kane
Just as a very minor point "read.csv" returns a data.frame. Therefore the data.frame in "data <- data.frame(read.csv("hw1_data.csv"))" is redundant and just adds clutter to the code. John Kane Kingston ON Canada > -Original Message- > From: g...@st-andrews.ac.uk > Sent: Fri, 1 Jul 2016

Re: [R] Difficulty subsetting data frames using logical operators

2016-07-02 Thread Ulrik Stervbo
Hi Giles, Look at ?mean In addition it seems you need to read a few tutorials on R. Several are already mentioned on this list otherwise Google can direct. Hope this helps, Ulrik Giles Bischoff schrieb am Fr., 1. Juli 2016 18:55: > So, I uploaded a data set via my directory using the command