% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/001_filetest.R
\name{filetest}
\alias{filetest}
\title{Testing using files}
\usage{
filetest(filename)
}
\arguments{
\item{filename}{the filename}
}
\value{
an integer read in from the file
}
\description{
This is just a test function to illustrate how to open files in functions
inside a package.
}
\details{
The answer to: how can I open a file in a function in a R package,
and test that using an example?
}
\examples{
#
filename=tempfile(fileext=".csv")
#
int=3
#
write.csv(int,file=filename,row.names=FALSE)
#
int2=filetest(filename)
#
message("temporary file name = ",filename)
message("before = ",int," and after = ",int2[1,1])




}
\author{
Stephen Jewson \email{stephen.jewson@gmail.com}
}
