pretty_mctq | R Documentation |
pretty_mctq()
helps you to transform your Munich ChronoType Questionnaire
(MCTQ) data in many ways. See the Arguments and Details section to learn
more.
pretty_mctq(data, round = TRUE, hms = TRUE)
data |
A |
round |
(optional) a |
hms |
(optional) a |
Please note that by rounding MCTQ values you discard data. That is to say that if you need to redo a computation, or do new ones, your values can be off by a couple of seconds (see round-off error).
Round your values only if and when you want to present them more clearly,
like in graphical representations. You can also round values to facilitate
data exporting to text formats (like .csv
), but note that this will come
with a precision cost.
Note also that pretty_mctq()
uses round()
for rounding,
which uses uses the IEC 60559 standard ("go to the even digit") for
rounding off a 5. Therefore, round(0.5)
is equal to 0 and round(-1.5)
is
equal to -2. See ?round
to learn more.
A transformed data.frame
object, as indicated
in the arguments.
Other utility functions:
random_mctq()
,
raw_data()
data <- data.frame( a = 1, b = lubridate::duration(1.12345), c = hms::hms(1.12345) ) ## Rounding time objects from `data` pretty_mctq(data, round = TRUE, hms = FALSE) ## Converting non-'hms' time objects from 'data' to 'hms' pretty_mctq(data, round = FALSE, hms = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.