Displaying 20 results from an estimated 6000 matches similar to: "Help -normal distribution"
2012 Apr 26
2
Subsetting dataframe with missing values
Dear R-community,
I am using R (V 2.14.1) on Windows 7. I have a dataset which consists of 19
variables for 91 individuals or rows. Two of my variables are Age
(adult/chick, with no NA values) and Sex (0 for females/1 for females, with
quite a few NA values). The sex of many adult birds is unknown (entered as
NA in dataframe). At some point of my analyses, I happen to need to need to
work with
2005 Mar 22
1
List of tables rather than an extra dimension in the table or (l)apply(xtabs)
I'm not sure how to best explain what I am after but here goes. I have a data frame with 2 geographical factors. One is the major region the other is the component regions.
I am trying to process all the regions at the same time without using "for". So I need (think, I do) a list of matrices each structured according to the number of subregions within each region.
So is there a
2004 Jun 22
1
Grouped AND stacked bar charts possible in R?
Good day all,
My statisticians want an R procedure that will produce grouped stacked
barplots. Barplot will
stack or group, but not both. The ftable function can produce a table
of the exact form they want, but the barplot doesn't show all the
divisions we want.
For an example, here's the sample from the help file for "ftable:"
data(Titanic)
ftable(Titanic, row.vars = 1:3)
2008 Sep 06
2
Hopefully an easy error bar question
Hi im trying to add error bars to my barplots, there very basic, i have a few grapghs where the y variable is different but on all the X variable is Age (Adult and Juvenile) however this is split into two levels so i have males and females, so my graph basically has four bars on it.
I know how to add eror bars for instance when there is only one level eg lookng at the diffrence between male and
2011 Feb 09
3
Need help merging two dataframes
Hi R users,
I am trying to extract some attributes (age, sex, area) from dataframe "AB"
that has 101,269 observations of 28 variables to dataframe "t2" that has 47
observations of 6 variables. They share a column called "id", which is a
factor with 47 levels. I want to end up with a dataframe that has 47
observations of 9 variables (the original 6 variables of t2,
2006 Jul 23
3
ANN: scoped_proxy plugin
ScopedProxy uses with_scope and proxy objects to make it easy to find and
count different types of records.
Example:
class Person < ActiveRecord::Base
scoped_proxy :minor, :conditions => ''age <= 17''
scoped_proxy :adult, :conditions => ''age >= 18''
scoped_proxy :old, :conditions => ''age >= 70''
scoped_proxy :male,
2012 Oct 21
2
conditional value assignment
Hi,
I am trying to assign values to records based conditionally on other records
within a dataframe. For example, in the following dataframe the "NA" value
in dat$age would be replaced if the age status for that individual and
specific year can be found in another record. Ideally this would then also
assign the same age status if the individual is recorded in a later year.
2012 Oct 22
3
Remove records from a large dataframe
Hi, I am trying to remove a series of records from a large dataframe. The
script I have written works fine but takes a long time to run. Can anyone
suggest a quicker way to do this?
Here is an example of the code I've written. The end result of this bit of
code would be a dataframe with any records relating to ID 1 or ID 4 removed:
#dataframe
id <- c(1,1,1,1,2,2,2,2,2, 3,3,3, 4,4)
2017 Jun 20
3
Help
Dear expert friends,
I'm pretty young of this world and my question at your eyes can be petty
easy.
I'll need to change the name of the levels inside a column of my data-frame
levels(ind.davis$Ageclass) <- c("adult", "Juvanile", "sub-adult")
names(ind.davis$Ageclass) <- c("Adult", "Juvenile", "Sub-adult")
that is what I
2017 Jun 20
0
Help
Leonardo--
R-help can be a very useful resource. Some suggestions to use it well:
1. use an informative subject line, not "help"
2. include a "minimal working example:" a *little* data, the code that,
with those data, reproduces your problem, and the error message that
resulted.
As to your particular question, at this point I can only guess, but for
starters it would
2009 Oct 02
3
plot scale
Hi,
Is there a way to set the scale of a plot (i.e. number of axis units
per centimeter) when you output it to postscript? If not, how am I
supposed to plot graphs with different axis limits to the same scale?
They just get resized to fit the paper so that graphs which show a
smaller number of axis units end up with a larger scale.
Cheers,
Ben
--
Dr. Ben Kenward
Department of Psychology,
2012 Aug 07
2
Passing arguments to a function within a function ...
Hallo Everybody
How do you specify arguments for a function used within another function?
Here is my problem:
I am reconstructing a calculator for the burden of disease due to air
pollution from publications and tools published by the WHO. The
calculations make use of published dose-response relationships for
particular health end-points. This is then applied to populations with
known or
2011 Jun 03
2
Arules: R Crashes when running eclat with tidLists=TRUE
Hello,
I'm using the eclat function of the arules package (1.0-6) for the
identification of frequent itemsets. I need the tidLists, but if I set
in the function tidLists=TRUE R crashes (Windows XP Professional SP3,
32 bit, R version 2.12.1 (2010-12-16), reproducible on two different
computers) with two different error messages or non at all. Minimum
examples are:
library(arules)
2012 May 05
3
metafor
Dear users of metafor,
I am working on a meta-analysis using the metafor package. I have a
excel csv database that I am working with. I am interested in pooling
the effect measures for a particular subgroup (European women) in this
csv database. I am conducting both sub-group and meta-regression.
In subgroup-analyses, I have stratified the database to create a
separate csv file just for European
2011 Oct 10
1
pmml for random forest & rules
Hi,
I am having some trouble using R 2.13.1 for generating a pmml object
of of class "c('randomForest.formula', 'randomForest')"
I see that these methods are available:
> methods(pmml)
[1] pmml.coxph* pmml.hclust* pmml.itemsets* pmml.kmeans*
pmml.ksvm* pmml.lm* pmml.multinom* pmml.nnet*
pmml.rpart*
[10] pmml.rsf* pmml.rules* pmml.survreg*
2008 May 11
1
superscript text on graph legend
Is that possible to create superscript text on the graph legend, for example
to put "cm2" (centimeter square) on the legend. Please show me how to do it.
Thanks.
--
Agus Susanto
[[alternative HTML version deleted]]
2011 Oct 21
1
cph/nomogram Design/RMS package hazard ratio: interquartile vs per unit
Hello,
I am constructing a nomogram using cph and nomogram commands in Dr.
Harrell's Design/RMS package. The HR that I obtain for dichotomous and
categorical variables are identical to those that I obtain using STATA
stcox. However, the inter-quartile HR I obtain for continuous variables is
obviously different, since STATA gives me HR for each unit (year,
centimeter, etc) like coxph would
2006 Jun 30
3
type casting
Hello,
I have a user table linked to the login code that was in the
"Agile" book. When someone signs in they are assigned to a group, such
as "adult" or "teenager". I would like to take this group string and
reference a table with "find_by_sql()" so that:
(group.capitalize).find_by_sql() would work (and, of course, in the
select request in the
2006 Mar 30
1
Predict function for 'newdata' of different dimension in svm
I am using the "predict" function on a support vector machine (svm)
object, and I don't understand why I can't predict on a dataset with more
observations than the training dataset.
I think this problem is a generic "predict" problem, but I'm not sure.
The original svm was fit on 50 observations.
2011 Apr 15
1
GLM and normality of predictors
Hi,
I have found quite a few posts on normality checking of response variables, but I am still in doubt about that. As it is easy to understand I'm not a statistician so be patient please.
I want to estimate the possible effects of some predictors on my response variable that is nº of males and nº of females (cbind(males,females)), so, it would be: