Learn R Programming

baizer (version 0.8.0)

pos_int_split: split a positive integer number as a number vector

Description

split a positive integer number as a number vector

Usage

pos_int_split(x, n, method = "average")

Value

number vector

Arguments

x

positive integer

n

length of the output

method

should be one of average, random, or a number vector which length is n

Examples

Run this code
pos_int_split(12, 3, method = "average")

pos_int_split(12, 3, method = "random")

pos_int_split(12, 3, method = c(1, 2, 3))

Run the code above in your browser using DataLab