search for: 1985

Displaying 20 results from an estimated 388 matches for "1985".

Did you mean: 185
2009 Apr 28
3
help working with date values
My data contains a variable "observation_date" and it contains values as: 1985-09-02 1985-09-15 1985-07-31 1985-09-02 I need to process data annually rather than daily, therefore I'm trying to 1) either extract the first 4 digits from this field and use them as a new variable "year" or 2) keep the variable as it is and process the analysis using the first 4 d...
2017 Nov 01
3
Adding Records to a Table in R
Dear R friends, I am currently working with time series data, and I have a table(as data frame) that has looks like this (TransitDate are in format = "%e-%B-%Y") : TransitDate Transits CargoTons 1985-04-01 100 2500 1985-05-01 135 4500 1985-06-01 120 1750 1985-07-01 100 3750 1985-08-01 200 1250 The problem is, that there are several periods that don?t exist in the table, so it has the following behavior:...
2017 Nov 01
0
Adding Records to a Table in R
Hi Paul, #First I set up some sample data since I don't have a copy of your data dtOrig <- as.Date( c("1985-04-01","1985-07-01","1985-12-01","1986-04-01")) dfOrig <- data.frame( TransitDate=dtOrig, Transits=c(100,100,500,325), CargoTons=c(1000,1080,3785,4200) ) #Generate the complete set of dates as a data frame dfDates<- data.frame( TransitDate=seq(from=as.Date(...
2011 Apr 25
2
Problem with ddply in the plyr-package: surprising output of a date-column
...rectly. Any idea what I do wrong? df <- data.frame(cbind(ID1=c(1,2,2,3,3,4,4),ID2=c('a','b','b','c','d','e','e'),ID3=c("v1","v1","v1","v1","v2","v1","v1"), Date=c("1985-05-1","1985-05-2","1985-05-3","1985-05-4","1985-05-5","1985-05-6","1985-05-7"), Value=c(1,2,3,4,5,6,7))) df[,1] <- as.character(df[,1]) df[,2] <- as.character(df[,2]) df$Date <- strptime(df$Date,"%Y-%m...
2010 Jul 27
1
repeating rows in R
...d 3 cases of HIV in my data, not 2 cases of HIV and 1 case of cancer. Is there an easy way to expand my data so that I actually end up with 22 rows instead of 10? Specifically, my data currently look like this: >my data AdmitYear Race Age.yrs. Insurance HIV Cancer NoRecords 1 1985 A 20 0 0 0 1 2 1985 A 21 0 0 0 1 3 1985 A 22 1 1 0 1 4 1985 A 23 0 0 0 2 5 1985 A...
2011 Jan 26
1
Using diff and transform
...with a difference column. The problem is that diff gives one less than the number of elements in the original data frame. So transform gives an error message. I know the first element of diff should be NA or ideally 0. But not sure how I get there. Any suggestions ? j Date Close 1 11/20/1985 156.412 2 11/21/1985 155.112 3 11/22/1985 154.182 4 11/25/1985 154.192 5 11/26/1985 153.722 6 11/27/1985 153.712 d <-diff(j[,2]) d [1] -1.30 -0.93 0.01 -0.47 -0.01 j <- transform(j, delta=diff(j[,2])) Error in data.frame(list(Date = c(5620L, 5639L, 5657L, 5706L, 5721L, 5736L : argument...
2017 Nov 08
3
Adding Records to a Table in R
...the values in dataset1 and only add the dates missing with value 0. Best regards, Paul 2017-11-01 15:21 GMT-05:00 Eric Berger <ericjberger at gmail.com>: > Hi Paul, > > #First I set up some sample data since I don't have a copy of your data > dtOrig <- as.Date( c("1985-04-01","1985-07-01","1985-12-01","1986-04-01")) > dfOrig <- data.frame( TransitDate=dtOrig, Transits=c(100,100,500,325), > CargoTons=c(1000,1080,3785,4200) ) > > #Generate the complete set of dates as a data frame > dfDates<- data.frame( Trans...
2017 Nov 08
0
Adding Records to a Table in R
...alue 0. > > Best regards, > > Paul > > 2017-11-01 15:21 GMT-05:00 Eric Berger <ericjberger at gmail.com>: > > > Hi Paul, > > > > #First I set up some sample data since I don't have a copy of your > > data dtOrig <- as.Date( > > c("1985-04-01","1985-07-01","1985-12-01","1986-04-01")) > > dfOrig <- data.frame( TransitDate=dtOrig, Transits=c(100,100,500,325), > > CargoTons=c(1000,1080,3785,4200) ) > > > > #Generate the complete set of dates as a data frame > > dfDat...
2017 Jul 04
5
about adding a column for water year
...s the structure below. But the wyear column just shows one year. Could anyone help me with this problem? Thanks. DF year month day time flow 1972 1 1 1972-01-01 5 1972 1 2 1972-01-02 5.5 1972 1 3 1972-01-03 6 ... 1985 12 31 1985-12-31 6 for(i in 1972:1985){ if(DF$year==i & DF$month %in% 1:9){ DF$wyear <- i { }else{ DF$wyear < i-1 } } } [[alternative HTML version deleted]]
2005 Oct 04
2
newbie questions - looping through hierarchial datafille
...lot_no tree_no leader_no; * calculate mean dbh in each plot data dbh set datafile; by inventory stratum_no plot_no tree_no leader_no if first.leader_no then output; proc summary data = diameter; by inventory stratum plot tree; var diameter; output out = mean mean=; run; A BENALLA_1 X 1 10 YE=1985 P 1 20.25 slope=14 SPP:P.RAD T 1 25 L 0 28.5 21.3528 F 0 21.3528 SFNSW_DIC:P F 21.3528 100 SFNSW_DIC:P T 2 25 L 0 32 23.1 F 0 6.5 SFNSW_DIC:A F 6.5 23.1 SFNSW_DIC:C F 23.1 100 SFNSW_DIC:C T 3 25 L 0 39.5 22.2407 F 0 4.7 SFNSW_DIC:A F 4.7 6.7 SFNSW_DIC:C P 2 20.25 slope=13 SPP:P.RAD T 1 25 L 0 38 22...
2011 Nov 19
3
reshape data.frame
A late friday afternoon coding question. I'm having a hard time thinking of the correct search terms for what I want to do. If I have a df like this: a <- data.frame(name=c(rep('a',10),rep('b',15)),year=c(1971:1980,1971:1985),amount=1:25) name year amount 1 a 1971 1 2 a 1972 2 3 a 1973 3 4 a 1974 4 5 a 1975 5 6 a 1976 6 7 a 1977 7 8 a 1978 8 9 a 1979 9 10 a 1980 10 11 b 1971 11 12 b 1972 12 13 b 1973 13 14...
2009 Jun 03
1
insert and count missing data
Hi R-users, I have missing data for the month. My question is how do I insert the missing month and fill up the cell with 'na' for the rain amount?  Then I would like to count the percentage of missing data. No     Year     month rain 1398 1985    10 104.2 1399 1985    11 138.0 1400 1985    12 120.4 1401 1986     1  12.6 1402 1986     2  19.4 1403 1986     3   1.0 1404 1986     4  58.8 1405 1986     5  98.4 1406 1986     6  56.6 1407 1986     7 280.4 1408 1986     8 128.2 1409 1986     9 100.0 1410 1986    10 166.0 1411 1986    12  68.1 1...
2012 Sep 07
4
[Bug 1985] -N and -O stop
https://bugzilla.mindrot.org/show_bug.cgi?id=1985 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |2035 --- Comment #2 from Damien Miller <djm at mindrot.org>...
2017 Jul 04
0
about adding a column for water year
...expr where "cond A length-one logical vector that is not NA." Your cond is a vector of length nrow(DF), so you don't want if, you want ifelse(). Did you fail to show us your warning messages?? 2. Revising your code and eliminating the extraneous brackets, one gets: for(i in 1972:1985){ ifelse(DF$year==i & DF$month %in% 1:9, DF$wyear <- i, DF$wyear < i-1) } But that doesn't work either, giving only 1985. Why? -- because the assignment statement DF$wyear <- i assigns the single value i to the whole column. So the whole column gets the last value of 1985,...
2017 Jul 05
4
Help with reshape/reshape2 needed
....387500000 1969 0.087500000 1970 0.275000000 1973 0.500000000 1974 0.362500000 1976 0.925000000 1978 0.712500000 1979 0.337500000 1980 0.700000000 1981 0.425000000 1982 0.212500000 1983 0.312500000 1986 0.237500000 1958 0.643564356 1963 0.250000000 1968 0.211538462 1976 0.317307692 1981 0.673076923 1985 0.730769231 1986 0.057692308 1957 0.073394495 1966 0.742574257 1961 0.082568807 1964 0.165137615 1965 0.137614679 1959 0.128712871 1968 0.587155963 1969 0.660550459 1970 0.477064220 1971 0.513761468 1973 0.449541284 1974 0.128440367 1968 0.415841584 1977 0.009174312 1979 0.339449541 1981 0.59633027...
2016 Oct 04
0
CentOS-announce Digest, Vol 140, Issue 1
...Contents of CentOS-announce digest..." Today's Topics: 1. CEEA-2016:1982 CentOS 5 tzdata Enhancement Update (Johnny Hughes) 2. CEEA-2016:1982 CentOS 6 tzdata Enhancement Update (Johnny Hughes) 3. CEEA-2016:1982 CentOS 7 tzdata Enhancement Update (Johnny Hughes) 4. CESA-2016:1985 Important CentOS 6 thunderbird Security Update (Johnny Hughes) 5. CESA-2016:1985 Important CentOS 5 thunderbird Security Update (Johnny Hughes) 6. CESA-2016:1985 Important CentOS 7 thunderbird Security Update (Johnny Hughes) ------------------------------------------------...
2004 Nov 03
2
[Bug 1985] rsync hangs reading pipe
https://bugzilla.samba.org/show_bug.cgi?id=1985 ------- Additional Comments From Uwe.Girlich@philosys.de 2004-11-02 23:13 ------- Created an attachment (id=753) --> (https://bugzilla.samba.org/attachment.cgi?id=753&action=view) shell script to reproduce the rsync problem This shell script creates some directories, a file and a nam...
2017 Jul 05
0
Help with reshape/reshape2 needed
The reason it doesn't work easily with reshape/reshape2 is that the order of the rows is not determined. Your answer could be 1957 1958 ... 1985 1986 0.8625000 0.7500000 ... 0.7307692 0.23750000 0.0733945 0.6435644 ... NA 0.05769231 0.5096154 NA ... NA 0.65137615 or 1957 1958 ... 1985 1986 0.0733945 0.6435644 ... NA 0.05769231 0.8625000 0.7500000 ... 0.7307692 0.23750000 0.5096154...
2017 Jul 04
0
about adding a column for water year
Hello, You have a '{' too many. for(i in 1972:1985){ if(DF$year==i & DF$month %in% 1:9){ DF$wyear <- i }else{ DF$wyear < i-1 } } } I believe this is it. Hope this helps, Rui Barradas Em 04-07-2017 19:31, lily li escreveu: > Hi R users, > I have a question about adding a column for wa...
2017 Jul 05
1
Help with reshape/reshape2 needed
...rary(prettyR) stretch_df(tadf,1,2) Jim On Thu, Jul 6, 2017 at 6:50 AM, Ista Zahn <istazahn at gmail.com> wrote: > The reason it doesn't work easily with reshape/reshape2 is that the > order of the rows is not determined. Your answer could be > > 1957 1958 ... 1985 1986 > 0.8625000 0.7500000 ... 0.7307692 0.23750000 > 0.0733945 0.6435644 ... NA 0.05769231 > 0.5096154 NA ... NA 0.65137615 > > or > > 1957 1958 ... 1985 1986 > 0.0733945 0.6435644 ... NA 0.05769231 > 0.8625000 0.750...