Displaying 20 results from an estimated 300 matches similar to: "Boxplot Fill Pattern"
2005 Nov 27
4
Counting the occurence of each unique "charecter string"
LS,
I would really like to know how to count the frequency/occurrence of chachters inside a dataset. I am working with extreemly large datasets of forest inventory data with a large variety of different species inside it.
Each row inside the dataframe represents one individual tree and the simplified dataframe looks something like this:
num species dbh
1 sp1
2005 Nov 27
4
Counting the occurence of each unique "charecter string"
LS,
I would really like to know how to count the frequency/occurrence of chachters inside a dataset. I am working with extreemly large datasets of forest inventory data with a large variety of different species inside it.
Each row inside the dataframe represents one individual tree and the simplified dataframe looks something like this:
num species dbh
1 sp1
2008 Feb 08
1
Can I index a dataframe with a reference from/to a second dataframe?
Hello,
I am unable to figure out how to code a new column in a data frame based
on an existing column that matches a column in a reference data frame,
in a relational-db fashion. I would like this to maintain a minimum set
of reference tables that may be reused over several similar datasets.
Specifically, I have two data frames as listed below, 'Bos' and 'tree.'
For each case in
2013 Jun 25
1
censor=FALSE and id options in survfit.coxph
Terry,
I recently noticed the censor argument of survfit. For some analyses it greatly reduces the size of the resulting object, which is a nice feature.
However, when combined with the id argument, only 1 prediction is made. Predictions can be made individually but I'd prefer to do them all at once if that change can be made.
Chris
#####################################
# CODE
# create
2013 May 23
3
Removing rows w/ smaller value from data frame
Hello,
I have a column called max_date in my data frame and I only want to keep the
bigger values for the same activity. How can I do that?
data frame:
activity max_dt
A 2013-03-05
B 2013-03-28
A 2013-03-28
C 2013-03-28
B 2013-03-01
Thank you for your help
--
View this message in context:
2011 Oct 11
1
Background Colors
Hi R-Help -
If I make a plot:
numYears = 500
plot(x = c(1,numYears), y = c(200,300), xlab = "Time", ylab = "Vegetation
Class", xlim = c(100,600), ylim = c(200,300), type="n")
Is there a way to make different parts of the background for the plot
different colors?
For example, I'd like to have the background color col = (250,250,0,50) for
y = c(200,204), and col
2013 Mar 27
9
conditional Dataframe filling
Hi everyone:
This may be trivial but I just have not been able to figure it out.
Imagine the following dataframe:
a b c d
TRUE TRUE TRUE TRUE
FALSE FALSE FALSE TRUE
FALSE TRUE FALSE FALSE
I would like to create a new dataframe, in which TRUE gets 0 but if
false then add 1 to the cell to the left. So the results for the
example above should be something like:
a b c
2013 Apr 12
5
how to change the date into an interval of date?
Hi,
I am not sure I understand your question correctly.
dat1<- read.table(text="
id??????????? responsed_at???????????????? number_of_connection????????????????? scores
1????????????????? 12-01-2010?????????????????????????????????? 1????????????????????????????????????????????? 2
1????????????????? 15-02-2010??????????????????????????????????
2013 Nov 05
0
Sampling question
Hi,
You may try:
dat1 <- structure(list(SubID = 1:8, CSE1 = c(6L, 6L, 5L, 5L, 5L, 5L,
3L, 3L), CSE2 = c(5L, 4L, 5L, 4L, 6L, 4L, 6L, 6L), CSE3 = c(6L,
7L, 5L, 3L, 7L, 3L, 6L, 6L), CSE4 = c(2L, 2L, 5L, 4L, 5L, 6L,
3L, 3L), WSE1 = c(6L, 6L, 5L, 4L, 6L, 4L, 6L, 6L), WSE2 = c(2L,
6L, 5L, 4L, 4L, 3L, 5L, 5L), WSE3 = c(2L, 2L, 4L, 5L, 4L, 7L,
2L, 4L), WSE4 = c(4L, 3L, 5L, 2L, 1L, 3L, 1L, 7L)),
2010 Mar 15
1
Aggregate and select mode
Greetings Everyone -
I have a data frame "x" that looks like this:
v1 v2
1 A
1 B
1 B
2 B
2 W
2 W
3 D
3 D
3 Z
What I would like to do is create a new data frame, "y", that has one row
for each unique value of v1, and returns the corresponding mode of v2. If I
were to run it on the above data frame, it should therefore return:
v1 v2
1
2013 Mar 19
4
Copying rows in data frames
Hi,
I'm trying to copy the first row of one data frame to another. This is the
statement I am using :
df2[1,]<-df1[1,];
I have printed them out separately:
df1[1,] = A C D E F
But after copying:
df2[1,] = 96 29 88 122 68
Why isn't it copying? They are both data frames, and "as.character" isn't
working either.
Thanks for your input :)
[[alternative HTML version
2011 Aug 10
1
Plotting Ellipses and Points of Matching Colors in an Ordination
Hello, R-Help -
I am trying to plot the results of an ordination from package vegan. The
tricky part for me right now is getting the colors of the ellipses denoting
the 95% confidence intervals of the group centroids to match the colors of
the points for those same groups.
>From and earlier post, I saw the code to make a plot of the ordination using
different colors for my different groups.
2011 Nov 17
1
Getting unique colours
Hey everyone,
I am new to R, and I'm making a scatter plot graph where i have a bunch of
plots/points that fall into 9 unique categories. I want each category to
have a unique colour, however, with the coding I have (below), the colour
black is repeated for two of my plot types. Does anyone know a quick way to
get 9 unique colours??
Coding:
plotba = plot (predictedba ~ actualba,
2013 Feb 01
29
cumulative sum by group and under some criteria
Thank you very much for your reply. Your code work well with this example.
I modified a little to fit my real data, I got an error massage.
Error in split.default(x = seq_len(nrow(x)), f = f, drop = drop, ...) :
Group length is 0 but data length > 0
On Thu, Jan 31, 2013 at 12:21 PM, arun kirshna [via R] <
ml-node+s789695n4657196h87@n4.nabble.com> wrote:
> Hi,
> Try this:
>
2009 Apr 10
4
split a character variable into several character variable by a character
Dear Mao Jianfeng,
"r-help-owner" is not the place for help, but:
r-help at r-project.org
(CC-ed here)
In any case, strsplit() does the job, i.e.:
> unlist(strsplit("BCPy01-01", "-"))
[1] "BCPy01" "01"
You can work with the whole variable, like:
splitpop <- strsplit(df1$popcode, "-")
then access the first part with
>
2013 Mar 11
0
splitting column into two
HI,
Try this:
dat1<- read.table(text="
?V1,V2,V3,V4,V5,V6,V7
?chr1,564563,564598,564588 564589,1336,+,134
?chr1,564620,564649,564644 564645,94,+,10
?chr1,565369,565404,565371 565372,217,+,8
?chr1,565463,565541,565480 565481,1214,+,15
?chr1,565653,565697,565662 565663,1031,+,28
?chr1,565861,565922,565883 565884,316,+,12
",sep=",",header=TRUE,stringsAsFactors=FALSE)
2006 Apr 17
0
difference of means as response?
Dear R users,
I am looking for some advice on the proper construction of a mixed model
in R, using the difference in means as the response and treating
within-means residuals as a random effect.
I have a dataframe (my own, a snippet of which is given below) that is
composed of observations of pollen viability in flowers along tree
branches. Flowers (1 to 3 per position) were collected from
2007 Jul 02
4
Extracting sums for individual factors in data frames
I have a data frame with two columns, one of which is a factor
(Species) and the other is numeric (BA, which stands for basal
area). Here's a sample:
Species BA
ACSA 55.7632696
FRAM 122.9933524
ACSA 67.54424205
ACSA 89.22123136
ACSA 82.46680716
ACSA 22.46238747
ACSA 19.94911335
ACSA 20.42035225
ACSA 19.00663555
ACSA 21.67698931
ACSA 57.80530483
ACSA 30.31636911
Dead 43.98229715
Dead
2010 Feb 04
1
Changing fonts of axis labels in Histogram() function
Dear All
I am using the histogram() function to plot two subsets from my data on the
same output display, i.e. there are two histogram plots
My code is:
histogram( ~ Age | Date, layout = c(1, 2),
xlab = "Age (years)",
strip = FALSE, strip.left = TRUE, col = "black",
border = "white", cex.axis = 1.1, family = "serif", cex.lab =
2005 Jul 15
1
nlme and spatially correlated errors
Dear R users,
I am using lme and nlme to account for spatially correlated errors as
random effects. My basic question is about being able to correct F, p, R2
and parameters of models that do not take into account the nature of such
errors using gls, glm or nlm and replace them for new F, p, R2 and
parameters using lme and nlme as random effects.
I am studying distribution patterns of 50 tree