| prep_summary | R Documentation | 
prep_summary
prep_summary( profile_dt, position_dt, x_points, y_points = x_points, xrng = range(position_dt$tx), yrng = range(position_dt$ty), facet_by = NULL, x_var = "x", y_var = "y", id_var = "id", wide_var = "name", tall_var = "tall_none", extra_vars = character() )
profile_dt | 
 a tidy data.table for profile data as retrieved by stsFetchTsneInput. Expected variable names are id, tall_var, wide_var, x, and y.  | 
position_dt | 
 a tidy data.table containing t-sne embedding. Expected variable names are tx, ty, id, and tall_var.  | 
x_points | 
 numeric. number of grid points to use in x dimension.  | 
y_points | 
 numeric. number of grid points to use in y dimension. Defaults to same value as x_points.  | 
xrng | 
 view domain in x dimension, default is range of position_dt$tx.  | 
yrng | 
 view domain in y dimension, default is range of position_dt$ty.  | 
facet_by | 
 character. variable name to facet profile_dt by when constructing images. The only valid non-null value with chiptsne functions is "tall_var".  | 
summary of profiles binned across tsne space according to x_points, y_points, and within xrng and yrng
data("profile_dt")
data("tsne_dt")
summary_dt = prep_summary(profile_dt, tsne_dt, 4)
img_res = prep_images(summary_dt, 4)
#zoom on top-right quadrant
summary_dt.zoom = prep_summary(profile_dt, tsne_dt, 4,
    xrng = c(0, .5), yrng = c(0, .5))
img_res.zoom = prep_images(summary_dt.zoom, 4,
    xrng = c(0, .5), yrng = c(0, .5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.