similar to: Data manipulation in R

Displaying 20 results from an estimated 7000 matches similar to: "Data manipulation in R"

2007 Oct 26
2
how do i find the annual maximun within several years?
dear kind helper, i would like to know how to find the annual maximun for a table that basicly looks like this: date time measurement1 measurement2 measurement3 mm/dd/yyyy hh:mm:ss m1 m2 m3 there are about 9000 measurements for each year, which makes it quite large... i already tried to subset all rows for a year, to find the maximum within these choosen rows, y <-
2009 Jul 15
0
strategy to iterate over repeated measures/longitudinal data
Hi Group, Create some example data. set.seed(1) wide_data <- data.frame( id=c(1:10), predictor1 = sample(c("a","b"),10,replace=TRUE), predictor2 = sample(c("a","b"),10,replace=TRUE), predictor3 = sample(c("a","b"),10,replace=TRUE), measurement1=rnorm(10), measurement2=rnorm(10)) head(wide_data) id
2012 Feb 07
5
Table rearranging
I have a table that looks like this: measurement?? ?date??? door ?? color 0.93529385?? ?513?? ?open?? ?red 0.97419293?? ?420??? open ?? red 0.962053514?? ?513?? ?closed?? ?red 0.963909937?? ?1230?? ?open?? ?blue 0.97652034?? ?1230?? ?open?? ?green 0.989310795?? ?1230?? ?closed?? ?blue 0.9941022?? ?917?? ?closed?? ?yellow I would like to create a table that has: Open measurement, Closed
2018 Jul 23
3
[PATCH v36 0/5] Virtio-balloon: support free page reporting
* Michael S. Tsirkin (mst at redhat.com) wrote: > On Fri, Jul 20, 2018 at 04:33:00PM +0800, Wei Wang wrote: > > This patch series is separated from the previous "Virtio-balloon > > Enhancement" series. The new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT, > > implemented by this series enables the virtio-balloon driver to report > > hints of guest free pages to
2010 Nov 25
3
How to "bin"/average" time points?
Dear all, I am pretty new to R only having an introduction course, so please bare with me. I am doing my PhD at The Max Planck Institute of Immunobiology where I am analyzing some calorimetry data from some mice. I have a spreadsheet consisting of measurements of the respiratory exchange rate at different time points measured every 9 minutes over some days. My goal is "bin"/average the
2011 Sep 29
2
String manipulation with regexpr, got to be a better way
Help-Rs,   I'm doing some string manipulation in a file where I converted a string date in mm/dd/yyyy format and returned the date yyyy.   I've used regexpr (hat tip to Gabor G for a very nice earlier post on this function) in steps (I've un-nested the code and provided it and an example of what I did below.  My question is: is there a more efficient way to do this.  Specifically is
2004 Dec 05
2
String manipulation---mixed case
Hello, Does anyone know of a "slick" way to get R to convert a string which is all upper case to a string where the first letter in each word is upper case and all others are lower case? I suspect the solution is to begin by parsing the string, convert the appropriate letters to upper and lower case using "toupper" and "tolower", and then to paste the pieces back
2005 Dec 05
1
need help with matrix manipulation
I hope my problem is not too basic to post here. I am a beginner having problems with some matrix manipulation. The data I am working with are sites with hourly ozone readings and is in a matrix where each row is a site and each column is an hourly reading. So for 10 sites, one day's worth of data is a 10x24 matrix - column 1 is the ozone measurement for midnight GMT, column 2 is ozone at
2003 Sep 07
4
data manipulation
Hi, I am new to R, coming from a few years using Stata. I've been twisting my brain and checking several R and S references over the last few days to try to solve this data management problem: I have a data set with a unique patient identifier that is repeated along multiple rows, a variable with month of patient encounter, and a continous variable for cost of individual encounters. The data
2013 Nov 13
1
[LLVMdev] Proposal: Improvements to Performance Tracking Infrastructure.
Great summary Kristof ! I do not know how frequent is the addition of a new benchmark, but this would disrupt the compile time measurement. On the other hand, we just want to see a (hopefully negative) slope and ignore steps due to new benchmark being added. Cheers, -- Arnaud On Wed, Nov 13, 2013 at 2:14 PM, Kristof Beyls <kristof.beyls at arm.com>wrote: > Hi, > > > >
2012 Mar 23
0
Fixing error variance in a path analysis to model measurement error in scales using sem package
Hi! I want to construct a path analysis model that can account for measurement error in totally aggregated parcels, which refer to parcels where all of the items in a scale are summed or averaged. If I am not mistaken, Bollen (1989) advocates the following formula for computing the error variance of each parcel: (1−α(parcel))×variance(parcel), such that α refers to Cronbach's alpha, which
2006 Mar 24
3
Date in dataframe manipulation
Hi, I have a dataframe with many columns, including date and I want to keep only a few of the columns including date column. I used the following command: with(FireDataAppling, cbind(STARTDATE, County, TOTAL, CAUSE) It works, but the date becomes days from Jan 1, 2001. FireDataAppling$STARTDATE[1] gives [1] 2001-01-04 00:00:00 1703 Levels: ......... After the cbind command, the entry
2010 Jul 29
4
reading dates in Excel into R
I am reading dates in Excel2007 into R. Here are the functions I used: library(RODBC) channel<-odbcConnectExcel2007("myfile.xlsx") tmp<-sqlFetch(channel,"1",as.is=T) The dates in myfile.xlsx are all in this format: mm/dd/yyyy. But when I read it to R, some columns look like "yyyy-mm-dd 00:00:00", some columns look like "yyyy-mm-dd", and some
2005 Sep 14
13
table sorting/manipulation library?
I have a library I''ve developed that I believe is the most flexible and useful table sorting/striping/row-selecting library around. Big features: Single and multiple-level sort Arbitrary sort criteria (IP address, date, etc.) Works with table headers that are > 1 row or column large Stripe tables and/or enable row selecting Row selecting supports drag-select and SHIFT-click No extra
2006 Mar 18
1
Time-Series, multiple measurements, ANOVA model over time points, analysis advice
Hi, I have some general questions about statistical analysis for a research dataset and a request for advice on using R and associated packages for a valid analysis of this data. I can only pose the problem as how to run multiple ANOVA tests on time series data, with reasonable controls of the family-wise error rate. If we run analysis at many small sections of a long time-series, the Type-I
2008 Oct 15
1
combining same-day lab measurements with 'apply'
Another request for help implementing the 'apply' functions to avoid a loop structure... I am working with a data set that includes lab measurements taken at different dates for the subjects, with some subjects having more results than others. I would like to average lab results for each subject that were taken on the same day. I can do this using a for loop, but would like to know how
2009 Jul 15
1
Help with averaging
Hi I am using the following script to average a set of data 0f 62 columns into 31 colums. The data consists of values of ln(0.01) or -4.60517 instead of NA's. These need to be averaged for each row (i.e 2 values being averaged). What I would I need to change for me to meet the conditions: 1. If each run of the sample has a value, the average is given 2. If only one run of the sample has a
2018 Sep 06
0
[PATCH v36 0/5] Virtio-balloon: support free page reporting
On 07/23/2018 10:36 PM, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (mst at redhat.com) wrote: >> On Fri, Jul 20, 2018 at 04:33:00PM +0800, Wei Wang wrote: >>> This patch series is separated from the previous "Virtio-balloon >>> Enhancement" series. The new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT, >>> implemented by this series enables the
2010 Jul 01
2
calculation on series with different time-steps
Hello, I have two series, one with stream stage measurements every 5 minutes, and the other with barometric pressure measurements every hour. I want to subtract each barometric pressure measurement from the 12 stage measurements closest in time to it (6 stage measurements on either side of the hour). I want to do something like the following, but I don't know the syntax. "If the
2008 Sep 07
3
Averaging 'blocks' of data
Dear all, I have a large dataset which I hope to reduce in size, to make it more useable. I hope to do this by taking an average of each 60 x 60 blockof values and forming a new data frame out of the averaged values. How would I go about taking averages of 60 x 60 'blocks' in R, and cycling through the whole dataset, recording each calculated value in a new table/data frame? Many thanks