AMR/man/as.mic.Rd

44 lines
1.4 KiB
Plaintext
Raw Normal View History

2018-02-21 11:52:31 +01:00
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mic.R
2018-02-21 11:52:31 +01:00
\name{as.mic}
\alias{as.mic}
\alias{is.mic}
\title{Class 'mic'}
\usage{
as.mic(x, na.rm = FALSE)
is.mic(x)
}
\arguments{
\item{x}{vector}
\item{na.rm}{a logical indicating whether missing values should be removed}
}
\value{
2018-10-17 17:32:34 +02:00
Ordered factor with new class \code{mic}
2018-02-21 11:52:31 +01:00
}
\description{
This transforms a vector to a new class \code{mic}, which is an ordered factor with valid MIC values as levels. Invalid MIC values will be translated as \code{NA} with a warning.
2018-02-21 11:52:31 +01:00
}
2019-01-02 23:24:07 +01:00
\section{Read more on our website!}{
\if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
2019-01-29 20:20:09 +01:00
On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
2019-01-02 23:24:07 +01:00
}
2018-02-22 20:48:48 +01:00
\examples{
mic_data <- as.mic(c(">=32", "1.0", "1", "1.00", 8, "<=0.128", "8", "16", "16"))
is.mic(mic_data)
2018-03-14 09:58:58 +01:00
2018-06-19 10:05:38 +02:00
# this can also coerce combined MIC/RSI values:
as.mic("<=0.002; S") # will return <=0.002
2018-06-19 10:05:38 +02:00
2018-02-22 20:48:48 +01:00
plot(mic_data)
2018-03-13 14:34:10 +01:00
barplot(mic_data)
2018-08-01 22:37:28 +02:00
freq(mic_data)
2018-02-22 20:48:48 +01:00
}
\seealso{
\code{\link{as.rsi}}
}
2018-07-13 17:23:46 +02:00
\keyword{mic}