Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create as.* functions (for output) #23

Closed
alexgenin opened this issue Sep 15, 2015 · 1 comment
Closed

Create as.* functions (for output) #23

alexgenin opened this issue Sep 15, 2015 · 1 comment
Assignees

Comments

@alexgenin
Copy link
Collaborator

After running all the indicators the user is likely to want to export the results to a more standard object like a data.frame (so it can do beautiful plots in ggplot for example).

To do this we need functions that take the output object:

list(variance = list(value = xx, ...), # OR variance = xx
     skewness = list(value = xx, ...), 
     psd = `psd object`, 
     ...) 
(class: c('spatial_indicators', 'list'))

and convert it to something like this

> as.data.frame(indic_object) 

data.frame of x rows and x columns
         replicate value
variance 1            xx
variance 2            yy
variance 3            zz
skewness 1            aa
skewness 2            bb
(etc.)

class: c('data.frame', 'list')

Non numerical indicators cannot fit into this data structure so I suggest dicarding them.

@alexgenin
Copy link
Collaborator Author

Obsolete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant