copy.data.structure: copy.data.structure

Description Usage Arguments Value Note Author(s) Examples

View source: R/copy.data.structure.r

Description

takes an exiting data frame, and returns the structure only

Usage

1

Arguments

x

the source data.frame

Value

y the empty data.frame

Note

MMM - 2016-06-16 - a note in the script says 'there must be an easier way of doing this ?' and there is: y=x[0,] - this gets the zero'th row

Author(s)

unknown, <unknown>@dfo-mpo.gc.ca

Examples

1
2
3
4
5
6
7
8
9
n = c(2, 3, 5) 
s = c("aa", "bb", "cc") 
b = c(TRUE, FALSE, TRUE) 
df = data.frame(n, s, b) 
str(copy.data.structure(df))
'data.frame':	0 obs. of  3 variables:
$ n: num 
$ s: chr 
$ b: logi 

Beothuk/bio.utilities documentation built on May 5, 2019, 1:39 p.m.