similar to: Grouping sets of data, performing function and re-assigning values

Displaying 20 results from an estimated 6000 matches similar to: "Grouping sets of data, performing function and re-assigning values"

2010 Aug 18
1
Problem using 'get'
Hi all, I have loaded a table called 'data' and used the split command to create a new table called 'datasplit' based on the variable 'a.ImageNumber' in 'data'. a.ImageNumber just specifies the image number that certain measurements are associated with (so there could be 330 measurements from image 1 and 297 measurements from image 2 etc). I would now like to
2010 Aug 06
2
Pausing script to allow user input from keyboard.
Hi all, I have written a simple R script to help me analyze a large data set. I would like to have the script pause to allow the user to input a character string that is subsequently used as a filename when saving tables. I have tried to use the "readline" command - this seems to work fine when entering commands one by one, but when I copy and paste the entire script into R,
2011 Mar 13
2
Problems getting html files out of R CMD check
Hi, I'm trying to R CMD check a package, however I have hit a snag. There seems to be a problem with the creation of the /html files (the only file that's constructed here is the 00Index.html). I've tested each of the .Rd files independently with R CMD Rdconv, they all happily create html files without complaint. R CMD check <package> gives the no warnings. I'm therefore
2008 Mar 04
2
summarizing replicates with multiple treatments
I have a dataframe with several different treatment variables, and would like to calculate the mean and standard deviation of the replicates for each day and treatment variable. It seems like it should be easy, but I've only managed to do it for one treatment at a time using subset and tapply. Here is an example dataset: > `exampledata` <- structure(list(day = c(1L, 1L, 1L, 1L, 1L,
2011 Aug 03
4
slow computation of functions over large datasets
Hello there, I’m computing the total value of an order from the price of the order items using a “for” loop and the “ifelse” function. I do this on a large dataframe (close to 1m lines). The computation of this function is painfully slow: in 1min only about 90 rows are calculated. The computation time taken for a given number of rows increases with the size of the dataset, see the example with
2009 Jan 14
2
runs.test in by() statement
Hi everybody I am a recent convert from SAS so please excuse me if this is all very obvious: I want to use the runs test {runs.test() in package tseries} to test the randomness of a certain variable in a survey for each interviewer. I tried to us the by() statement but it doesn't seem to work with runs.test() as the function. Here is what I have: Consider a data frame with two variables and
2004 Jul 22
3
Replace only Capital Letters
Dear All, I have these data: exampledata <- c("This is one item", "This is Another One", "And so is This") I would like to find each occurence of a blank space followed by a Capital Letter and replace it by a blank space, a left curly brace, the respective Capital Letter, and then a right curly brace. I thought the following will do: gsub(pattern = "
2013 Sep 27
0
erasing an hdd - forensics of hard disk drives, dban, destroying hdd
greetings list, i am creating a new thread because of comment made by; From: Nicolas Thierry-Mieg <Nicolas.Thierry-Mieg at imag.fr> in thread "Subject: [CentOS] erase disk". in past readings about; erasing an hdd, forensics of hard disk drives, dban, destroying hdd i submit these links for those who may wish to further their knowledge on primaries of hdd forensics;
2012 Oct 05
1
avoid <<- in specific case
Hi all, I improved a function drawing horizontal histograms (code below) which uses barplot and works fine. It does,however, need to assign a function to the global environment to later find the actual location on the vertical axis, and not the number of bars used by barplot. Hopefully, running the examples below will illustrate that. As said, it works perfectly fine and does exactly what I
2011 Jan 20
2
adding text to y-axis per row of panels (lattice)
Dear all, Being a newbie to R, I've trawled through many old posts on this list looking for a solution to my problem, but unfortunately couldn't quite figure it out myself. I'd be very grateful if someone here on this list could perhaps help me out. I have a lattice plot with several panels and would like to add some text next to the y-axis on the right hand side of each row of
2009 Nov 21
1
what do i do to fix missing packages...see error
> exampledata <- rnorm(10000) > summary(exampledata) Min. 1st Qu. Median Mean 3rd Qu. Max. -4.030000 -0.666200 -0.023390 -0.009384 0.664700 4.092000 > desc <- function(mydata) { + require(e1071) + quantls <- quantile(x=mydata, probs=seq(from=0, to=1, by=0.25)) + themean <- mean(mydata) + thesd <- sd(mydata) + kurt <-
2017 Nov 29
3
Removing a data subset
Say I have a dataset that looks like Location Year GW_Elv MW01 1999 546.63 MW02 1999 474.21 MW03 1999 471.94 MW04 1999 466.80 MW01 2000 545.90 MW02 2000 546.10 The whole dataset is at http://doylesdartden.com/ExampleData.csv and I use the code below to do the graph but I want to do it without MW01. How can I
2012 Jan 22
1
hook for configuring checking of \example{} sections of the documentation during R CMD check
Dear all, In a new package, I try to check the examples given in the \example section of the Rd files. However, the examples cannot be run if the package is not instructed, during startup time, in the place where some data are to be found ( with system.file("exampleData", "xyz", package="rcqp"). Is there any hook available, or a place where some code might be
2012 Feb 02
1
[LLVMdev] Efficient Constant Uniquing
Chris asked me to look into improving the current sad state of ConstantUniqueMap, and by coincidence Meador Inge started working on the same thing on his own initiative, so I'm writing down a concrete proposal to make sure we're not working at cross purposes. The ConstantUniqueMap template class is used to store unique instances of ConstantStruct, ConstantVector, ConstantArray,
2007 May 08
1
Looking for a comprehensive descriptive statistics package
Hi all, I'm looking for a package that will give me comprehensive set of descriptive statistics, including skew and kurtosis. Also, is there a similar package that will provide multivariate descriptive statistics as well? Thanks in advance, David -- =========================================================================== David Kaplan, Ph.D. Professor Department of Educational
2011 Jun 07
1
XML segfault on some architectures
Hi, I found an architecture-specific segfault problem with the XML package. I originally found the problem using the parseKGML2Graph function in the Bioconductor KEGGgraph package, but as far as I can tell the underlying issue seems to be with the xmlTreeParse which is called by parseKGML2Graph. I'm trying this piece of code, from the xmlTreeParse help page: library(XML) fileName <-
2010 Jul 06
1
Error in affypdnn package
Dear all, I am a PhD student working with Affymetrix HGU133atag array for analyzing the Latin square experiment. I was trying to generate gene expression index for hgu133atag array for PDNN model. While extracting the chiptype specific data structure, I got the following error- > library(affypdnn) Loading required package: affy Loading required package: Biobase Welcome to Bioconductor
2015 Oct 31
1
Example input data with example output using relative pathway in vignette of R package?
I'm putting together an R package. I would like to show example code in the vignette, where example data files (included in the package) are used to generate an (example) output file. I read about using example data in Hadley Wickham's post ( http://r-pkgs.had.co.nz/data.html), and believe I should keep my example data as raw data, as it must be parsed to generate the output. So, I
2017 Nov 29
0
Removing a data subset
Reading in the data from the file x <- read.csv( "ExampleData.csv", header = TRUE, stringsAsFactors = FALSE ) Subsetting as you want x <- x[ x$Location != "MW01", ] This selects all rows where the value in column 'Location' is not equal to "MW01". The comma after that ensures that all columns are copied into the amended data.frame. Rgds,
2008 Dec 12
1
Support vector model?
Dear All, Apologies for sending this email to both list, but at this point I'm not sure which one could help me the most. I have 4 sets of data, 1 test and 3 different sets of controls. The measurements are binary, with a matrix of 0 and 1 I'm measuring across time (rows, ~815) the behaviour of organelles in the cell by microscopy in response to different stimuli (several measurements