search for: yr1

Displaying 6 results from an estimated 6 matches for "yr1".

Did you mean: vr1
2007 Mar 05
1
Matrix/dataframe indexing
Hi all, I am hoping someone can help me out with this: If I have dataframe of years and ages and the first column and first row are filled with leading values: Df<- age1 age2 age3 Yr1 1 0.4 0.16 Yr2 1.5 0 0 Yr3 0.9 0 0 Yr4 1 0 0 Yr5 1.2 0 0 Yr6 1.4 0 0 Yr7 0.8 0 0 Yr8 0.6 0 0 Yr9 1.1 0 0 Now the rest of the cells need to be filled according to the previous year and age cell so arbitrarily, cell [2,2] should be value in cell [1,1] * exp(0.3), and cell [2,3] shoul...
2023 Jan 14
1
Removing variables from data frame with a wile card
You rang sir? library(tidyverse) xx = 1:10 yr1 = yr2 = yr3 = rnorm(10) dat1 <- data.frame(xx , yr1, yr2, y3) dat1 %>% select(!starts_with("yr")) or for something a bit more exotic as I have been trying to learn a bit about the "data.table package library(data.table) xx = 1:10 yr1 = yr2 = yr3 = rnorm(10) dat2 <- da...
2008 Jan 06
3
need help
Hi, I'm Roslina, PhD student of University of South Australia, Australia from school Maths and Stats. I use S-Plus before and now has started using R-package. I used to analyse rainfall data using julian date. Is there any similar function that you can suggest to me to be used in R-package? Thank you so much for your attention and help [[alternative HTML version deleted]]
2013 Jul 04
2
how to choose dates data?
i have converted my data into date format like below: > day=as.Date(originaldate,"%m/%d/%Y") > day[1:5] [1] "2008-04-12" "2011-07-02" "2011-09-02" "2008-04-12" "2008-04-12" I wish to select only those observations from 2007 to 2009, how can I select from this list? [[alternative HTML version deleted]]
2006 Sep 20
1
Simulation help
I'm trying to simulate trend data over a five year period. I want different trend profiles...the simplest being a linear trend. I've been using the following code: patBdta1 <- NULL for(i in 1:100) patBdta1 <- rbind(patBdta1,c(yr1= mean(rbinom(50,1,.50)), yr2 =mean(rbinom(50,1,.51)), yr3 =mean(rbinom(50,1,.52)), yr4 =mean(rbinom(50,1,.53)), yr5 =mean(rbinom(50,1,.54)))) This code creates 100 data sets e...
2023 Jan 14
3
Removing variables from data frame with a wile card
...uot; "weight" "confeduc" "confothr" "college" >> [6] ... >> [41] "yr3" "yr4" "yr5" "yr6" "yr7" >> [46] "yr8" "yr9" "yr10" "yr11" "yr12" >> [51] "yr13" "yr14" "yr15" "yr16" "yr17" >> [56] "yr18" "yr19" "yr20" "yr21" "yr22" >> [61] &...