expand_column_values | R Documentation |
Creates extra columns to store in a list
expand_column_values(column, values, index_i, index_j)
column |
Name of column to be expanded |
values |
Actual |
index_i |
|
index_j |
Second |
Given a vector
of values, create repeated values of it according to two index variables.
A list
thedf <- data.frame(
ID=rep(LETTERS[1:3], length.out=10),
x=sample(10),
y=sample(10),
extra1=sample(letters, size=10),
extra2=sample(letters, size=10),
extra3=sample(10),
extra4=Sys.time() + 1:10
)
distancethreshold:::expand_column_values('extra1', thedf$extra1, index_i=c(1, 3), index_j=c(2, 4))
distancethreshold:::expand_column_values('extra2', thedf$extra2, index_i=c(1, 3), index_j=c(2, 4))
distancethreshold:::expand_column_values('extra3', thedf$extra3, index_i=c(1, 3), index_j=c(2, 4))
distancethreshold:::expand_column_values('extra4', thedf$extra4, index_i=c(1, 3), index_j=c(2, 4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.