Learn R Programming

drawsample

The goal of drawsample is to take sample/s data/s with desired properties.

Installation

You can install the development version of drawsample from GitHub with:

# install.packages("devtools")
devtools::install_github("atalay-k/drawsample")

Example

This is a basic example which shows you how to solve a common problem:

library(drawsample)
data(example_data)
# First 6 rows of the example_data
head(example_data)
#> # A tibble: 6 × 3
#>      ID Score_1 Score_2
#>   <dbl>   <dbl>   <dbl>
#> 1     1      16      18
#> 2     2      23      24
#> 3     3      13      11
#> 4     4      14       8
#> 5     5      20      17
#> 6     6      20      17
# Draw a sample based on Score_1(from negatively skewed to normal)
output1 <- draw_sample(dist=example_data[,c(1,2)],n=200,skew = 0,kurts = 0,
save.output=FALSE) 

Copy Link

Version

Install

install.packages('drawsample')

Monthly Downloads

332

Version

1.0.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Kubra Kabasakal

Last Published

January 20th, 2026

Functions in drawsample (1.0.2)

draw_sample_rep

Multiple Sample Selection
constants_table

Fleishman's Power Method Transformation Constants
draw_sample_n_ir

Sample data close to desired characteristics with individual responses - nearest
draw_sample

Draw Samples with the Desired Properties from a Data Set
draw_sample_shiny

Draw Samples with a Shiny Applications
drawsample-package

Draw Samples with the Desired Properties from a Data Set
draw_sample_ir

Sample data with individual responses
draw_sample_n

Sample data close to desired characteristics - nearest
example_data

Example Data
likert_example

Likert Example Data