Skip to content
Permalink
c5d03d2a60
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
23 lines (22 sloc) 726 Bytes
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/filter.columns.as.na.R
\name{filter.columns.as.na}
\alias{filter.columns.as.na}
\title{Delete Colums with only NA}
\usage{
filter.columns.as.na(df, value = "not reported")
}
\arguments{
\item{df}{Data frame}
\item{value}{A value or character that should be converted to NA.}
}
\value{
Returns the filtered data frame
}
\description{
Sometimes actual NA values are indicated as other strings (e.g. "not reported"). This function converts these strings to NA and ultimately deletes any column consisting only of NA values.
}
\examples{
df <- data.frame(num1 = c(1,2,3,4), num2= c(5,6,7, "not reported"))
df <- filter.column.as.na(df, "no value")
}