similar to: Descriptive Stats from Data Frame

Displaying 20 results from an estimated 1000 matches similar to: "Descriptive Stats from Data Frame"

2008 Jun 19
1
PrettyR (describe)
#is there a way to get NA in the table of descriptive statistics instead of the function stopping Thank you in advance #data x.f <- structure(list(Site = structure(c(9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L), .Label = c("BC", "HC", "RM119", "RM148", "RM179", "RM185",
2011 Aug 31
2
Entering Multiline Commands With ESS
If there's a separate ESS user mail list, please point me to it. I'm using emacs with ESS and want to enter multiline commands for plots. Examples in my reference books show each line terminating with a comma so labels and other attributes can be specified for the plot before it is submitted for rendering. When I try to do this, however, I get an error: > boxplot(chemdata$quant ~
2011 Dec 28
1
subset() missing one factor
The data set (called 'chemdata') has 6 columns (4 factors, 1 date, 1 numeric) and I need to create subsets for each of one of the factors ('stream'). This has worked flawlessly for all but two streams which were created yesterday. The command I use to create the subsets is like this: > rnchH <- subset(chemdata, stream == 'RanchSpgsH', select = c(site, sampdate,
2011 Oct 04
3
How to subset() from data frame using specific rows
I have a data frame called chemdata with this structure: > str(chemdata) 'data.frame': 14886 obs. of 4 variables: $ site : Factor w/ 148 levels "BC-0.5","BC-1",..: 104 145 126 115 114 128 124 2 3 3 ... $ sampdate: Date, format: "1996-12-27" "1996-08-22" ... $ param : Factor w/ 8 levels "As","Ca","Cl",..:
2011 Aug 31
1
Correct Syntax for subset.data.frame()
I want to create individual data.frames for each of the 8 param factors in chemdata. The syntax I tried (based on Teetor's book, page 132) and R's response are: > ars <- subset(chemdata, select=c(site,sampdate,param,quant), subset=(param = "As")) Error in subset.data.frame(chemdata, select = c(site, sampdate, param, : 'subset' must evaluate to logical
2011 Aug 31
3
Scatter Plot Command Syntax Using Data.Frame Source
I've tried various commands. ?plot, Teetor's book, "R Cookbook", and Mittal's book, "R Graphs Cookbook" without seeing how to write the command to create scatterplots from my data.frame. The structure is: > str(chemdata) 'data.frame': 14886 obs. of 4 variables: $ site : Factor w/ 148 levels "BC-0.5","BC-1",..: 104 145 126 115
2012 Sep 28
1
Lattice bwplot(): Conditioning on one factor
I'm not able to create the proper syntax to specify a lattice bwplot() for only one of two conditioning factors. The syntax that produces a box plot of each of the two conditioning factors is: bwplot(quant ~ param | era, data=mg.d, main='Dissolved Magnesium', ylab='Concentration (mg/L)') What I've tried unsuccessfully are: bwplot(quant ~ param |
2003 Aug 22
2
"subscript out of range" message
Hi All: I was recently working with a dataset on arsenic poisoning. Among the variables in the dataset, I used the following three variables to produce crosstabulations (variable names: FOLSTAT, GENDER, ASBIN; all three were categorical variables, FOLSTAT denoted follow up status for the subjects and had seven levels, GENDER denoted sex (two levels: male,female), and ASBIN denoted binarized
2004 Oct 20
1
Drawing multiple line plots
Hi All: Greetings, and best wishes from the festive times here at Kolkata, India -- the time of Durga Puja celebrations. I seek your advice as I try plotting lines for my data. The problem: I have created a dataframe that looks like this (name: myFrame): lowest second third fourth highest significance INAS 0.107 0.115 0.123 0.115 0.166 0.000 MMA 0.091 0.107 0.115
2004 Apr 26
2
Looking for help in calculating percentiles
Hi All: I am working with a dataset on Arsenic toxicity, and I am trying to calculate the 20th, 40th, 60th, 80th, and highest percentiles for a variable, dietary Moisture (variable name dMoist). The inbuilt function quantile(dMoist) would print 0, 25th, 50th, 75th, and 100th percentile. Does there exist a function that can calculate xth percentile (where x = 10th, 20th, ... etc) values?
2011 Oct 27
2
Syntax Check: rshape2 melt()
This is my first excursion into using reshape2 and I want to ensure that the melt() function call is syntactically correct. The unmodifed data frame is organized this way: head(tds.anal) site sampdate param quant 1 UDS-O 2006-12-06 TDS 10800 4 STC-FS 1996-06-14 Cond 280 7 UDS-O 2007-10-04 Mg 1620 9 UDS-O 2007-10-04 SO4 7580 19 JCM-10B 2007-06-21 Ca 79 20
2009 Aug 20
1
Questions on factors in regression analysis
I got two questions on factors in regression: Q1. In a table, there a few categorical/factor variables, a few numerical variables and the response variable is numeric. Some factors are important but others not. How to determine which categorical variables are significant to the response variable? Q2. As we knew, lm can deal with categorical variables. I thought, when there is a categorical
2011 Oct 24
2
Syntax Help for xyplot()
Thanks to David's help I subset my large data set and produced a smaller one for a single stream and 7 factors of interest. The structure of this data frame is: str(burns.tds.anal) 'data.frame': 718 obs. of 4 variables: $ site : Factor w/ 143 levels "BC-0.5","BC-1",..: 1 1 4 6 4 4 4 5 5 5 $ sampdate: Date, format: "1996-06-02"
2013 Feb 02
1
Mixed Models: Contribution of random variable to final estimate
Dear all, We want to test if the invasiveStatus is predicted by the amount (quant) of animals arriving to a country of a certain species (taxonid). We are using lmer to perform the model. The model is: lmer(invasiveStatus~I(log(quant+1))+I(log(inDegree+1))+(1|taxonid)+(1|country), family=binomial,data=td), where invasiveStatus is a binary variable, quant and inDegree are integer variables, and
2011 May 16
1
Linear Discriminant Analysis error: "Variables appear constant"
Hi R experts, I'm attempting to run Linear Discriminant Analysis using the lda function in the MASS package. I've got around 50 predictor variables and one response variable. My response variable has 5 numeric categories that represent different clusters of fish abundance data (clusters were developed using Bray-Curtis and NMDS), and my predictor variables are environmental variables that
2012 Jun 07
1
Quantile regression: Discrepencies Between optimizer and rq()
Hello Everyone, I'm currently learning about quantile regressions. I've been using an optimizer to compare with the rq() command for quantile regression. When I run the code, the results show that my coefficients are consistent with rq(), but the intercept term can vary by a lot. I don't think my optimizer code is wrong and suspects it has something to do with the starting
2010 May 16
1
problems with generation of quantiles under For ()
Dear, I want to make an application to calculate quantile within a For() I tried the following without success: ej. date p_val <- matrix(sample(10, 1000, replace=TRUE), 200,5) test 1 rr <- paste("p_val$",names(p_val[1]), sep="") quant <- quantile(rr, probs = c(0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100)/100, na.rm=FALSE, type=1) test 2 rr <-
2012 May 08
1
what folder to run write_PACKAGES in?
I set up a local repo for testing packages. My packages are not showing up from the repository when viewed by Linux clients. I suspect this is a web administrator/firewall issue, but it could be I created the repo wrongly. I am supposed to run write_PACKAGES separately in each R-version folder. Right? Maybe other novices can use these scripts, if they are not wrong :) Here's the file
2009 Apr 25
3
Nomogram with stratified cph in Design package
Hello, I am using Dr. Harrell's design package to make a nomogram. I was able to make a beautiful one without stratifying, however, I will need to stratify to meet PH assumptions. This is where I go wrong, but I'm not sure where. Non-Stratified Nomogram:
2006 Jul 12
2
shapiro.test() output
R Users: My question is probably more about elementary statistics than the mechanics of using R, but I've been dabbling in R (version 2.2.0) and used it recently to test some data . I have a relatively small set of observations (n = 12) of arsenic concentrations in background groundwater and wanted to test my assumption of normality. I used the Shapiro-Wilk test (by calling shapiro.test()