% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/transforms.R
\name{wid_convert}
\alias{wid_convert}
\title{Convert a wid_df to another currency}
\usage{
wid_convert(data, target = "usd", base_year = NULL)
}
\arguments{
\item{data}{A \code{wid_df}.}

\item{target}{One of \code{"lcu"}, \code{"usd"}, \code{"eur"}, \code{"gbp"}, \code{"ppp"}, \code{"yppp"}.}

\item{base_year}{Pin to a specific year's exchange rate; \code{NULL} uses contemporaneous rates.}
}
\value{
The same \code{wid_df} with values converted. Dimensionless series
(shares, ratios) are returned unchanged with a message.
}
\description{
Convert a wid_df to another currency
}
\examples{
\donttest{
  if (nzchar(Sys.getenv("WID_API_KEY"))) {
    d <- download_wid("aptinc992j", areas = "US", perc = "p99p100",
                      years = 2010:2020)
    wid_convert(d, target = "ppp")
  }
}
}
