Displaying 20 results from an estimated 2360 matches for "1997".
Did you mean:
1,97
2006 Mar 08
2
Survival Plots by Strata
...fit1<-coxph(Surv(Entry, Exit, Fate)~Sex + Agerelease +
Dayrelease + strata(Year), data=mydat)
coxfit.apc<-survfit(apc.coxfit1)
coxfit.apc
plot(survfit(apc.coxfit1), conf.int=F, log=T, lty=c(1:2), col=c(1:2),
xlim=c(205, 800)) #not run--first entry for this example is day 205 for
1996, 259 for 1997
>mydat
ID Year Dayrelease
Agerelease Survivorship Entry Exit Fate Sex
16240 1996 205 95 164 205 369 1 0
16319 1996 205 88 140 205 345 1 0
16378 1996 248 108 100 248 348 1 0
20383 1996 241 98 204 241 445 1 0
16324 1996 219 90 227 219 446 1 0
16327 1996 219 90 497 219 716 1 0
20373 1996 241 114 4...
2011 Jul 06
3
Reshape from long to wide format with date variable
...frame from a long format to a wide format.
Unfortunately, I have a continuous date variable which gives me headaches.
Consider the following example:
> id=c("034","034","016","016","016","340","340")
> date=as.Date(c("1997-09-28", "1997-10-06", "1997-11-04", "2000-09-27",
> "2003-07-20", "1997-11-08", "1997-11-08"))
> ref=c("2","2","1","1","2","1","1")
> data1=data.frame(id,d...
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
8028 1995
8029 1998"),head=TRUE,stringsAsFactors=FALSE))
becomes:
A B C
8025 1995 0
8026 1995 0
8029 1995 0
8026 1996 1
8025 1997 1
8026 199...
2006 Nov 23
1
how to loop this?
...uot;1996-10-29", "1996-11-02", "1996-11-09", "1996-11-14", "1996-11-19",
"1996-11-23", "1996-11-25", "1996-11-29", "1996-12-02", "1996-12-09",
"1996-12-15", "1996-12-25", "1997-01-06", "1997-01-10", "1997-01-16",
"1997-01-20", "1997-01-22", "1997-01-27", "1997-02-01", "1997-02-04",
"1997-02-10", "1997-02-17", "1997-02-26", "1997-03-04", "1997-03-...
2012 Apr 17
1
Function with multiple indices
...j without observation i and call it "med"
3. substract "med" from the sales of observation i to obtain the group median adjusted sales performance for observation i
The dataset, function, and questions are as follows.
x1 <- read.table(textConnection("YEAR GROUP SALES
1997 11 0.027
1997 11 0.001
1997 11 0.697
1997 11 0.047
1997 11 0.225
1998 11 0.025
1998 11 0.002
1998 11 0.001
1998 11 0.659
1998 11 0.037
1997 12 0.152
1997 12 0.025
1997 12 0.417
1997 12 0.081
1997 12 0.194
1997 12 0.069
1997 12 0.062
1998 12 0.146
1998 12 0.028
1998 12 0.437
1997...
2004 Jul 26
5
aggregate function
...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 110
1997 0.58 0 0 0
1997 1.00 0 0 0
1994 1.00 0 0 0
1997 1.00 0 40 70
1998 1.00 0 0 1252
1999 1.04 0...
2011 May 24
2
Data Frame housekeeping
...a large data frame that is organized by date in a peculiar way. I
am seeking advice on how to transform the data into a format that is of
more use to me.
The data is organized as follows:
STN_ID YEAR MM ELEM X1 X2 X3 X4
X5 X6 X7
1 2402594 1997 9 1 *-00233* *-00204* *-00119* -00190 -00251
-00243 -00249
2 2402594 1997 10 1 -00003 -00005 -00001 -00039
-00031 -00036 -00033
3 2402594 1997 11 1 000025 000065 000070 000069
000115 000072 000093
4 2402594 1997 12 1 000160 000...
2006 Nov 22
3
dataframe manipulation
...uot;, "1996-10-29", "1996-11-02", "1996-11-09", "1996-11-14",
"1996-11-19", "1996-11-23", "1996-11-25", "1996-11-29", "1996-12-02",
"1996-12-09", "1996-12-15", "1996-12-25", "1997-01-06", "1997-01-10",
"1997-01-16", "1997-01-20", "1997-01-22", "1997-01-27", "1997-02-01",
"1997-02-04", "1997-02-10", "1997-02-17", "1997-02-26", "1997-03-04",
"1997-03-09"...
2013 Jul 12
4
simplify a dataframe
...uot;, "Congo", "Congo", "Congo", "Congo",
"Congo", "Gabon", "Gabon", "Gabon", "Gabon", "Gabon", "Gabon",
"Congo", "Congo"), Debut = c("24/01/1995", "01/05/1997", "31/12/1997",
"02/02/1995", "28/02/1995", "01/03/1995", "13/03/1995", "01/01/1996",
"31/01/1996", "24/01/1995", "01/07/1995", "01/09/1995", "01/07/1997",
"01/01/1998", &quo...
1998 Mar 12
2
R-beta: ctest_0_9-3_tar.tar
I'm having trouble un 'tar'ing the file ctest_0_9-3_tar.tar.
When using the command "tar -xv" on a UNIX machine I get the
"checksum error" message. When trying to use WinZip on a Win95
machine it gives an error reading the header.
I'm downloading from the CRAN site at Carnegie Mellon. Could the file
there be corrupted?
Thanks for any help, and sorry if
1998 Mar 12
2
R-beta: ctest_0_9-3_tar.tar
I'm having trouble un 'tar'ing the file ctest_0_9-3_tar.tar.
When using the command "tar -xv" on a UNIX machine I get the
"checksum error" message. When trying to use WinZip on a Win95
machine it gives an error reading the header.
I'm downloading from the CRAN site at Carnegie Mellon. Could the file
there be corrupted?
Thanks for any help, and sorry if
2009 Dec 03
4
Two-way/Three-way sum.
Hi R Users,
I'm wondering how can I calculate two (or three) way sum of a variable. A
sample data is:
State Month Year Value
NC Jan 1996 1
NC Jan 1996 2
NC Feb 1997 2
NC Feb 1997 3
NC Mar 1998 3
NC Mar 1998 4
NY Jan 1996 4
NY Jan 1996 5
NY Feb 1997 5
NY Feb 1997 6
NY Mar 1998 6
NY Mar 1998 7
I'm trying to sum up "value" column by State*Month and by State*Month*Year.
Also, I may need to calculate mean value along with "sum".
Any help w...
2014 Jul 17
3
FW: Selección eficiente de individuos
Hola,
Otra forma, utilizando la función de intervalos y la que comprueba si otro
intervalo se solapa del paquete "lubridate":
#----------------------
library(lubridate)
fe.chas <- data.frame(
entra=c('2001-01-01','2001-06-01','2003-01-01')
,sale=c('2002-01-01','2002-06-01','2004-01-01')
)
ref <-
2005 May 26
2
warnings from hist(): parameter XXX couldn't be set in high-level plot functionN
...#
#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.
> StartDate[sample(1:length(StartDate),20)]
[1] "2004-08-26" "1997-09-08" "2004-08-19" "1997-09-08" "0999-07-20"
[6] "2001-11-28" "2000-11-02" "1997-09-08" "2004-08-19" "2004-10-28"
[11] "1997-09-08" "1997-09-09" "1997-09-08" "1998-09-08" &...
2004 Nov 23
2
How to extract data?
I appreciate if anyone can help me,
I have a table as follow,
> rate
DATE VALUE
1 1997-01-10 5.30
2 1997-01-17 5.30
3 1997-01-24 5.28
4 1997-01-31 5.30
5 1997-02-07 5.29
6 1997-02-14 5.26
7 1997-02-21 5.24
8 1997-02-28 5.26
9 1997-03-07 5.30
10 1997-03-14 5.30
. ...... ...
. ...... ...
. ...... ...
I want to extract the DATE(s) on which...
1997 Jan 16
0
/bin/login
...ase refere to message posted to linux-security on Mon, 23 Dec 1996
under subject ''Buffer overflow in Linux''s login program'' -- alex]
From mail@mail.redhat.com mail2.redhat.com dutecai.et.tudelft.nl by (8.6.10/1.34JP)
Received: (qmail 3750 invoked from network); 17 Jan 1997 07:08:37 -0000
Received: from rosie.et.tudelft.nl (130.161.127.248)
by mail2.redhat.com with SMTP; 17 Jan 1997 07:08:36 -0000
Received: from cave.et.tudelft.nl (cave.et.tudelft.nl [130.161.127.241]) by rosie.et.tudelft.nl (8.7.4/8.7.3) with ESMTP id RAA26124 for <linux-security@redhat.com>;...
2008 Oct 20
4
command line escaping a dash
I cannot figure this out...
I would like to change the owner of a bunch of folders whose name begins
with a dash...
# chown Administrator \-BILLED\ JOBS\ -\ 1997-2002 -R
chown: invalid option -- B
Try `chown --help' for more information.
# chown Administrator "\-BILLED\ JOBS\ -\ 1997-2002" -R
chown: cannot access `\\-BILLED\\ JOBS\\ -\\ 1997-2002': No such file or
directory
# chown Administrator "-BILLED JOBS - 1997-2002" -R
ch...
2011 Aug 22
1
Selecting cases from matrices stored in lists
Hi,
I have two lists (c and h - see below) containing matrices with similar
cases but different values. I want to split these matrices into multiple
matrices based on the values in h. So, I did the following:
years<-c(1997:1999)
for (t in 1:length(years))
{
year=as.character(years[t])
h[[year]]<-sapply(colnames(h[[year]]), function(var)
h[[year]][h[[year]][,var]>0, h[[year]][var,]>0])
}
Now that I have created list h (with split matrices), I would like to use
these sele...
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 that the new variable 'S...
2013 Aug 01
3
Problemas con NA y sub-selección por índice
...PUREZA_A SEXO NAC TRAZAB_P PUREZA_P NAC_P TRAZAB_M
PUREZA_M NAC_M
717 pi M 1995-04-21 NA pi 1991-04-17 NA pi
1990-03-10
1434 pi H 2005-11-18 NA pi 1999-08-05 NA pi
1996-11-06
2151 pi H 2002-04-30 NA pi 1997-08-30 NA pi
1996-09-07
2868 pi M 2012-04-12 NA pi 2006-07-19 NA pi
2006-10-09
PESO
717 76
1434 NA
2151 NA
2868 NA
Si coloco toda la orden entre na.omit() no me da resultados porque en
algunos campos diferentes de PESO existen NA.
No logro dar la...