Permalink
Cannot retrieve contributors at this time
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?
mmRmeta/man/filter.columns.as.na.Rd
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
23 lines (22 sloc)
726 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% 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") | |
} |