mirror of
https://github.com/msberends/AMR.git
synced 2025-07-09 04:42:22 +02:00
read.4D improvements
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/read_4d.R
|
||||
\name{read_4D}
|
||||
\alias{read_4D}
|
||||
% Please edit documentation in R/read.4d.R
|
||||
\name{read.4D}
|
||||
\alias{read.4D}
|
||||
\title{Read data from 4D database}
|
||||
\usage{
|
||||
read_4D(file, header = TRUE, sep = "\\t", quote = "\\"'",
|
||||
dec = ",", na.strings = c("NA", "", "."), skip = 2,
|
||||
check.names = TRUE, strip.white = TRUE, fill = TRUE,
|
||||
blank.lines.skip = TRUE, stringsAsFactors = FALSE,
|
||||
read.4D(file, info = interactive(), header = TRUE, row.names = NULL,
|
||||
sep = "\\t", quote = "\\"'", dec = ",", na.strings = c("NA", "",
|
||||
"."), skip = 2, check.names = TRUE, strip.white = TRUE,
|
||||
fill = TRUE, blank.lines.skip = TRUE, stringsAsFactors = FALSE,
|
||||
fileEncoding = "UTF-8", encoding = "UTF-8")
|
||||
}
|
||||
\arguments{
|
||||
@ -32,12 +32,29 @@ read_4D(file, header = TRUE, sep = "\\t", quote = "\\"'",
|
||||
\code{\link{url}}.)
|
||||
}
|
||||
|
||||
\item{info}{a logical to indicate whether info about the import should be printed, defaults to \code{TRUE} in interactive sessions}
|
||||
|
||||
\item{header}{a logical value indicating whether the file contains the
|
||||
names of the variables as its first line. If missing, the value is
|
||||
determined from the file format: \code{header} is set to \code{TRUE}
|
||||
if and only if the first row contains one fewer field than the
|
||||
number of columns.}
|
||||
|
||||
\item{row.names}{a vector of row names. This can be a vector giving
|
||||
the actual row names, or a single number giving the column of the
|
||||
table which contains the row names, or character string giving the
|
||||
name of the table column containing the row names.
|
||||
|
||||
If there is a header and the first row contains one fewer field than
|
||||
the number of columns, the first column in the input is used for the
|
||||
row names. Otherwise if \code{row.names} is missing, the rows are
|
||||
numbered.
|
||||
|
||||
Using \code{row.names = NULL} forces row numbering. Missing or
|
||||
\code{NULL} \code{row.names} generate row names that are considered
|
||||
to be \sQuote{automatic} (and not preserved by \code{\link{as.matrix}}).
|
||||
}
|
||||
|
||||
\item{sep}{the field separator character. Values on each line of the
|
||||
file are separated by this character. If \code{sep = ""} (the
|
||||
default for \code{read.table}) the separator is \sQuote{white space},
|
||||
@ -100,5 +117,8 @@ read_4D(file, header = TRUE, sep = "\\t", quote = "\\"'",
|
||||
}
|
||||
}
|
||||
\description{
|
||||
This function is only useful for the MMB department of the UMCG. Use this function to \strong{import data by just defining the \code{file} parameter}. It will automatically transform birth dates and calculate patients age, translate the data set to English, transform the \code{mo} with \code{\link{as.mo}} and transform all antimicrobial columns with \code{\link{as.rsi}}.
|
||||
This function is only useful for the MMB department of the UMCG. Use this function to \strong{import data by just defining the \code{file} parameter}. It will automatically transform birth dates and calculate patients age, translate the column names to English, transform the \code{mo} with \code{\link{as.mo}} and transform all antimicrobial columns with \code{\link{as.rsi}}.
|
||||
}
|
||||
\details{
|
||||
Column names will be transformed, but the original column names are set as a "label" attribute and can be seen in e.g. RStudio Viewer.
|
||||
}
|
Reference in New Issue
Block a user