sample_df: Randomly sample a img df to reduce points

Description Usage Arguments Value Examples

Description

Randomly sample a img df to reduce points

Usage

1

Arguments

img_df

A tidy data frame - output from img_df()

frac

Numeric, between 0 and 1, fraction of total points to be included

Value

A tidy data frame with a reduced number of rows

Examples

1
2
3
4
5
6
img_path <- system.file("extdata/images", "seurat.png", package = "pointillist")

png_df <- img_df(img_path)
nrow(png_df)
png_df_sample <- sample_df(png_df, 0.3)
nrow(png_df_sample)

alexwhan/pointillist documentation built on May 10, 2019, 8:58 a.m.