Skip to content

Commit

Permalink
Merge pull request #1301 from kadyb/master
Browse files Browse the repository at this point in the history
mention `is.bool()` in `datatype()` doc (for #1300)
  • Loading branch information
rhijmans authored Oct 2, 2023
2 parents 3f479d3 + 959127c commit 2934787
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion man/datatype.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ Get the data types of the fields (attributes, variables) of a SpatVector or of t

\value{character}

\seealso{
\code{\link[=is.bool]{Raster value types}} to check / set the type of SpatRaster values in memory.
}

\examples{
f <- system.file("ex/lux.shp", package="terra")
Expand All @@ -36,7 +39,7 @@ f <- system.file("ex/elev.tif", package="terra")
r <- rast(f)
datatype(r)

datatype(rast())
datatype(rast()) # no data type
}

\keyword{methods}
Expand Down
2 changes: 1 addition & 1 deletion man/is.bool.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ See \code{\link{levels}} and \code{\link{cats}} to create categorical layers by
}

\description{
\code{as.bool} and \code{as.int} force the values into the correct range (e.g. whole integers) but in-memory cell values are still stored as numeric. They will behave like the assigned types, though, and will be written to files with that data type (if the file type supports it).
\code{as.bool} and \code{as.int} force the values into the correct range (e.g. whole integers) but in-memory cell values are still stored as numeric. They will behave like the assigned types, though, and will be written to files with that data type (if the file type supports it).
}

\arguments{
Expand Down

0 comments on commit 2934787

Please sign in to comment.