Displaying 20 results from an estimated 20000 matches similar to: "multi panel plot using xyplot()"
2007 Feb 07
1
Problem with subsets and xyplot
Hello
I have a dataframe that looks like this
MSA CITY HIVEST YEAR YR CAT
1 0200 Albuquerque 0.50 1996 1996 5
2 0520 Atlanta 13.00 1997 1997 5
3 0720 Baltimore 29.10 1994 1994 1
4 0720 Baltimore 13.00 1995 1995 5
5 0720 Baltimore 3.68
2006 Nov 23
1
how to loop this?
Hi,
I have the next procedure:
t1<-data.frame(table(substr(names(subset(lasker[[1]], lasker[[1]] >=
4)), 1, 7)))
t1[1:5,]
Var1 Freq
1 1988-02 3
2 1988-03 1
3 1988-04 1
4 1988-05 2
5 1988-06 3
How to make a new list?, dataframe? having 189 elements in the 'lasker'
list:
> str(lasker[[1]])
'table' int [, 1:1274] 1 1 3 2 1 5 4 1 1 4 ...
-
2006 Nov 22
3
dataframe manipulation
Hi,
Having a dataframe 'l1' (dput output is below):
>dim(l1)
1274 2
>l1[1:12,]
Var1 Freq
1 1988-01-13 1
2 1988-01-16 1
3 1988-01-20 3
4 1988-01-25 2
5 1988-01-30 1
6 1988-02-01 5
7 1988-02-08 4
8 1988-02-14 1
9 1988-02-16 1
10 1988-02-18 4
11 1988-02-24 2
12 1988-03-04 1
I want to extract the times
2005 Mar 01
6
lattice -- panel order display
R-help,
I'm using 'xyplot' in lattice package which plots length frecuencies by
year (10).
The order I get is not logical and the 'index.cond' argument to
'xyplot' is a bit cumbersome when it comes to plot a great deal of (in
my case years).
I have tried sorting the conditioning variable but still get the same
result.
Is there any easy way to do it without making use
2011 Jun 02
2
Counting occurrences in a moving window
Hi list, based on the following data.frame I would like to create a variable
that indicates the number of occurrences of A in the 3 years prior to the
current year:
DF = data.frame(read.table(textConnection(" A B
8025 1995
8026 1995
8029 1995
8026 1996
8025 1997
8026 1997
8025 1997
8027 1997
8026 1999
8027 1999
8028 1995
8029 1998
8025 1997
8027 1997
8026 1999
8027 1999
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"
2007 Oct 25
1
subsetting
Dear all,
I have received some data on birds that looks sth like this:
# a unique id for each individual
id <- c(1,1,1,2,2,2,3,3,3,4,4,5,6)
# the year the bird was measured
year <- c(1995, 1996, 1997, 1995, 1996, 1997, 1996, 1997, 1998, 1996, 1997, 1997, 1998)
# the year the bird was hatched
year.hatch <- c(1995, 1995, 1995, 1995, 1995, 1995, 1996, 1996, 1996, 1996, 1996, 1997, 1998)
2008 Aug 15
5
x-axis with month and year
Hey list!
I have a csv-file with two variables: (Date,CMI)
Date,CMI
Jan-93,3.24
Feb-93,-2.56
.
.
.
Dec-06, 8.25
When I want to plot this dataset, R is sorting the date in alphabetical
order. Is there any way to tell R not to do it?
I know it is probably an easy issue but I couldn't find a solution so
far. I have seen so many tips already but can't apply it on my own
dataset.
Thank
2013 Apr 20
2
creating dummy variables
Hello R-users,
The below is a snippet of my data:
fid crop year value
5_1_1 SWHE 1995 171
5_1_1 SWHE 1997 696
5_1_1 BARL 1996 114
5_1_1 BARL 1997 344
5_2_2 SWHE 1995 120
5_2_2 SWHE 1996 511
5_2_2 BARL 1996 239
5_2_2 BARL 1997 349
Here, I want to create dummy variables with the names of the content of a column 'crop' in a way
2008 May 09
2
Tabulation of aggregated data.frame
Hi useRs!
I would like to know how to make aggregated data.frame with
aggregate() tabulated.
For example, I run the following command to aggregate re with respect
to group1 and group2.
> (aggr <- with(final, aggregate(re, group1, group2, mean)))
Group.1 Group.2 x
1 1992 15 0.16392
2 1993 15 0.15467
3 1994 15 0.15456
4 1995 15 0.15391
2011 Apr 20
3
[test message] Can R replicate this data manipulation in SAS?
Apologies for troubling the list, but it is a test that
needs to be carried out. I am resending the message that
I sent earlier on behalf of Paul Miller, but with a
certain word used in the variables names of the SAS code
changed to a different word.
With thanks for your tolerance ...
Ted.
[*** PLEASE NOTE: I am sending this message on behalf of
Paul Miller:
Paul Miller <pjmiller_57 at
2007 Oct 26
1
[Fwd: Re: subsetting]
Sorry that I was unclear. For an individual to qualify for my analysis I
want both of the following two criteria to be fulfilled:
First, I want to select measurement taken at a certain age: for the
focal individual the year of measurement (year) should be the same as
year.hatch
Second, I want the focal individual to be born by a mother that
reproduces for the first time.
So the /parents /of
2006 Nov 26
1
adding elemens to a list
Hi,
I have a list of 20 elements, each of them of variable length and with a
structure like this:
lasker[[1]][1:10,]
Var1 Freq
1 1988-02 3
2 1988-03 1
3 1988-04 1
4 1988-05 2
5 1988-06 3
6 1988-07 1
7 1988-08 1
8 1988-09 1
9 1989-03 1
10 1989-04 1
How do I can insert in this list:
1988-01 0
1988-10 0
1988-11 0
1988-12 0
1989-01 0
2010 Jun 18
3
inverse function of melt
Dear list,
I'm looking for an inverse function of melt(which is in package reshape).Namely, I had a data frame like this
(Table1)
YEAR VAR1 VAR2 VAR3
1995 7 3 45
1996 5 6 32
1997 6 10 15
I transformed my data by using the melt function and my data was reshaped in the following format:
(Table2)
YEAR variable
2012 Apr 30
2
for loop problem
Hi all,
I was wondering if you can help me with the following situation:
I have a data frame that includes weather station data for 30 years in
the form:
YEAR, MONTH, DAY, TEMP
1970, 01, 01, -15
...
1999, 12, 31, -21
I would like to add another variable "JULIAN" that assigns the integers
1 to 365 (and 1 to 366 for leap years) for each day of a year over
multiple years.
Here is what
2011 Nov 01
3
factor level issue after subsetting
Dear list,
I cannot figure out why, after sub-setting my data, that particular item
which I don't want to plot is still in the newly created subset (please
see example below). R somehow remembers what was in the original data
set. A work around is exporting and importing the new subset. Then it's
all fine; but I don't like this idea and was wondering what am I missing
here?
Thanks!
2005 Jun 15
4
Multiple line plots
Greetings,
I would like to plot three lines on the same figure, and I am lost. There is
an answer to a similar thread… but I tried matplot and it is beyond me. An
example of the data follows:
Year EM IM BM
1983 9.1 16.8 -7.7
1984 12.0 18.0 -6.0
1985 13.6 19.1 -5.5
1986 12.4 17.3 -4.9
1987 14.6 20.3 -5.7
1988 20.6 23.3 -2.6
1989 25.0 27.2 -2.2
1990 28.4 30.2 -1.8
1991 33.3 31.2 2.1
1992 40.6
2005 May 26
2
warnings from hist(): parameter XXX couldn't be set in high-level plot functionN
Hello -
This is not a real problem, just an annoyance. Sometimes, but not always,
I get a set of strange warnings from hist(). Example follows.
############################
#Produce a histogram of start dates for a set of field measurements.
# I didn't reproduce all the dates, because not sure it's relevant, but
here's a sample.
# Note the invalid date in the fifth element.
>
2013 Mar 14
1
ggplot2 problem
Hello all!
I have a problem with ggplot2 library. I want to do an heat map and the y
variables are the year months. If I use the following code, he y values are
in alphabetical order, but I want it in month order.
The code is:
library(reshape)
library(ggplot2)
library(scales)
p <- ggplot(data.m, aes(variable, Month)) + geom_tile(aes(fill = value),
2004 Jul 26
5
aggregate function
Hi all,
I have the folowing frame(there are more columns than shown),
1 2 3 4 5
Year Total Tus Whi Norw
1994 1.00 1830 0 355
1995 1.00 0 0 0
1995 1.00 0 0 0
1995 1.00 4910 4280 695
1997 1.00 0 0