convert_grid: Convert continuous coordinate into integer, essential for...

View source: R/simSRTLocs.R

convert_gridR Documentation

Convert continuous coordinate into integer, essential for BayesSpace to determine the neighborhood info

Description

Convert continuous coordinate into integer, essential for BayesSpace to determine the neighborhood info

Usage

convert_grid(x)

Arguments

x

A numeric vector of continuous coordinate

Value

Returns a numeric vector oof integer coordinate

Examples


## Create a simSRT object
toySRT  <- createSRT(count_in=toyData$toyCount,loc_in = toyData$toyInfo)
set.seed(1)

## Create New Locations within Profile
toySRT2  <- srtsim_newlocs(toySRT,new_loc_num=1000)

## Convert non-integer x-coordinates into an integer value
newGrid_x <- convert_grid(simcolData(toySRT2)$x)

SRTsim documentation built on Sept. 11, 2024, 6:54 p.m.