# NOT RUN {
data(zPhysActBedRest)
## Example 1:
# }
# NOT RUN {
wr_ad_lb1499 = read.csv("wr_ad_lb1499.csv")
# }
# NOT RUN {
wr_ad_lb1499_slp = markbedrest(dset=wr_ad_lb1499, age="ad", loc="wr"
, rstdr = tempdir()
## previous line is only included to comply with CRAN policies
)
## Example 2 (transforms data set to demonstrate other arguments):
alt_wr_ad_lb1499 = wr_ad_lb1499
colnames(alt_wr_ad_lb1499) = c("tstmp", "Counts")
alt_wr_ad_lb1499_slp = markbedrest(dset = alt_wr_ad_lb1499,
TS = "tstmp",
cts = "Counts",
TH = 400,
wd = 1500,
nvm = 150,
per = 30,
rstdr = tempdir(),
rstfl = "alt_wr_ad_lb1499_sum",
EC = FALSE)
## Note: the two examples have the same result, as can be verified:
table(alt_wr_ad_lb1499_slp$bedrest==wr_ad_lb1499_slp$bedrest)
# }
Run the code above in your browser using DataLab