% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{stringsAsStrings}
\alias{stringsAsStrings}
\alias{strings_please}
\title{Set the global option \code{\link{options}(stringsAsFactors = FALSE)} inside
a parent function and restore the option after the parent function exits}
\usage{
stringsAsStrings()

strings_please()
}
\description{
This is a shorthand of \code{opts = options(stringsAsFactors = FALSE);
on.exit(options(opts), add = TRUE)}; \code{strings_please()} is an alias of
\code{stringsAsStrings()}.
}
\examples{
f = function() {
    xfun::strings_please()
    data.frame(x = letters[1:4], y = factor(letters[1:4]))
}
str(f())  # the first column should be character
}
