similar to: Running an ANOVA with a BY

Displaying 20 results from an estimated 1000 matches similar to: "Running an ANOVA with a BY"

2009 Sep 28
6
SAS user now converting to R - Help with Transpose
I am just starting to code in R and need some help as I am used to doing this in SAS. I have a dataset that looks like this: Chemical Well1 Well2 Well3 Well4 BOD 13.2 14.2 15.5 14.2 O2 7.8 2.6 3.5 2.4 TURB 10.2 14.6 18.5 17.3 and so on with more chemicals.... I would like to transpose my data so that it looks like this: Chemical WellID Value BOD Well1 13.2 BOD Well2 14.2 BOD Well3 15.5 BOD
2012 Feb 11
2
obtaining a true/false vector with combination of strsplit, length, unlist,
Hi, A pared down version of the dataset I'm working with: edm<-read.table(textConnection("WELLID X_GRID Y_GRID LAYER ROW COLUMN SPECIES CALCULATED OBSERVED w301_3 4428. 1389 2 6 18 1 3558 6490. w304_12 4836. 6627 2 27 20 1 3509 3228. 02_10_12080 3.6125E+04 13875 1 56 145 1
2011 Mar 11
3
Large dataset operations
Hello all, I'm new to R and trying to figure out how to perform calculations on a large dataset (300 000 datapoints). I have already made some code to do this but it is awfully slow. What I want to do is add a new column for each "rep_ " column where I have taken each value and divide it by the mean of all values where "PlateNo" is the same. My data is in the following
2010 May 14
2
insert values based on common ID
Forum, with the datasets a and b below, I'm trying to establish a relationship based on the common column "week" and insert the value from the column weekAvg in b to the column weekAvg in a. The dataset a is several thousand lines long. I've tried looking at 'match', writing functions, 'rbind.fill' and various search terms in this forum to no avail. Thanks...
2011 May 04
1
merging multiple columns from two dataframes
Hello, I have data in a dataframe with 139104 rows which is multiple of 96x1449. i have a phenotype file which contains the phenotype information for the 96 samples. the snp name is repeated 1449X96 samples. I haveto merge the two dataframes based on sid and sen. this is how my two dataframes look like dat<-data.frame(snpname=rep(letters[1:12],12),sid=rep(1:12,each=12),
2010 Jul 20
1
Transformation of Y changes the 'lm' object?
Hi R, This is a problem, which I have tried to present in a simple way: Let, x1=1:10 x2=2:11 y=2+3*x1 lm_obj=lm(y~x1+x2) lm_obj step(lm_obj) # Step function for the first time y=y^0.1 lm_obj step(lm_obj) #Step function after a transformation on Y, but 'lm_obj' is not modified. The two step function behave differently. The first one is before the
2007 May 31
1
Choosing a column for analysis in a function
Hello all, I'm having a problem concerning choosing columns from a dataset in a function. I'm writing a function for data input etc., which first reads the data, and then does several data manipulation tasks. The function can be then used, with just giving the path of the .txt file where the data is being held. These datasets consists of over 20 different analytes. Though, statistical
2007 Mar 20
5
abline within data range
Dear R helpers, I would like to have abline, for a lm model for example, lying within data range. Do you know how to get it? Thank in advance Nguyen D Nguyen #CODE x<- rnorm(200, 35,5) y<- rnorm(200, 0.87,0.12) plot(y~x, xlim=c(0,50), pch=17, bty="l") abline(lm(y~x)) # I would like abline is between min(x) and max(x) [[alternative HTML version deleted]]
1997 Oct 17
1
R-beta: more model.matrix
I am trying to show some techniques to my graduate regression class. The textbook mentioned using bootstrap samples of regression coefficients for assessing variability. I decided to show them reasonably effective ways of doing the resampling. The following is a function I wrote to create bootstrap samples of coefficients from a fitted linear regression model. bsCoefSample <- ##
2007 Feb 15
1
Problem in summaryBy
The R script below gives values of 1 for all minimum values when I use a custom function in summaryBy. I get the correct values when I use FUN=min directly. Any help is much appreciated. The continuous information provided in this forum is fabulous as are the different R packages available. Rene # Simulated simplified data Subj <- rep(1:4, each=6) Analyte <-
2009 Jan 30
2
Regression
Hello, I have problem I have a, and b in regression then I can't plot x,y with (and) a, b lines can you help me ? thx [[alternative HTML version deleted]]
2002 Dec 06
2
Mutiple page trellis plots with relation = "free" or "sliced"
Hello, Has anyone out there encountered a problem like this: xyplot(Plasma ~ Serum | Analyte, data = sp.df, aspect = 1, layout = c(1, 1, 200), scales = list(relation = "free") ) Gives the error: Error in pretty(x[is.finite(x)], ...) : x must be numeric On the other hand, this works (but I don't want the default of having everything on the same
2012 Apr 24
1
Specifying a function as not being and S3 Class function
I am compiling a library with legacy code which has functions named with periods in the names - but are not S3 class functions. For example for example, summary.agriculture is not an extension of the summary function for and 'agriculture. class object - it is just poorly named. Is it possible to keep from triggering the following warning when I check the package? * checking S3
2003 Jul 10
6
info
HI I'm a student in chemical engineering, and i have to implement an algoritm about FIVE PARAMETERS INTERPOLATION for a calibration curve (dose, optical density) y = a + (c - a) /(1+ e[-b(x-m]) where x = ln(analyte dose + 1) y = the optical absorbance data a = the curves top asymptote b = the slope of the curve c = the curves bottom asymptote m = the curve X intercept Have you never seen
2006 Jun 21
1
eliminating a do loop
Using a "by() statement, I am preparing ANOVA's for multiple experiments, and using simint() to generate confidence intervals. This works fine. simint.by.fit <- by(analytes.dfr, list(Assay = analytes.dfr$analyte ), function(data) (simint(value ~ tx, data = data,type='Tukey' ) ) ) I can separately prepare plots of the confidence intervals, and I can prepare separate plots
2012 Jul 26
2
Working with Numbers generated from Regression Output
Hi, I have a query on regression output generated by R. > result=lm( Y~X , data=trail) > summary(result) After running this 2 statements the following output is generated. Call: lm(formula = Y ~ X, data = trail) Residuals: Min 1Q Median 3Q Max -245.30 -90.77 -30.30 54.99 532.78 Coefficients: Estimate Std. Error t value Pr(>|t|)
2011 Jul 14
1
Repating a loop of lm function with different columns of database
Hi, First let me thank you for the incredible help and resource that this forum is. I am trying to compare the repeated measurement of more than 100 analytes that have been take in 70 subjects at 2 time points adjusted for the time difference of sample times(TimeDifferenceDays), therefore I wanted to do it with a function that allows me to do all at once. (131 is the column difference that
2010 Jan 15
1
'nlme' library - lme function results
Dear R-helpers I am running a simple mixed effects model using lme(). The call looks like this: fit <- lme(Analyte~Sample, data=Data, random=~1 | Run) I am particularly interested in the estimated random effects. When I print the 'fit' object, it looks something like example below: (...) Random effects: Formula: ~1 | Run (Intercept) Residual StdDev: 3.483794 3.637523
2015 Aug 30
2
[OT] new R logo in vector graphics format
L.S. Since some time there is a new r-project.org site as announced here: https://stat.ethz.ch/pipermail/r-announce/2015/000581.html The logo has changed on the site, but I fail to find a vector graphics file. For the previous logo I used to go to https://svn.r-project.org/R-dev-web/trunk/Logo/ Is there anything similar for the new logo? Many thanks in advance. Kind regards, Tobias --
2013 Apr 23
2
Needed: Beta Testers and Summer Camp Students
Greetings. I'm teaching linear regression this semester and that means I write more functions for my regression support package "rockchalk". I'm at a point now were some fresh eyes would help, so if you are a student in a course on regression, please consider looking over my package overview document here: http://pj.freefaculty.org/R/rockchalk.pdf That tells how you can grab