-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
69 lines (48 loc) · 2.07 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
output:
md_document:
variant: markdown_github
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, echo = FALSE, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/"
)
```
# cocoreg
`cocoreg` is an R-package for extracting shared variation in collections of datasets using regression models. The current stable release is available in CRAN:
[http://cran.r-project.org/package=cocoreg](http://cran.r-project.org/package=cocoreg)
The algorithm is described in the paper:
Using regression makes extraction of shared variation in multiple datasets easy:
Jussi Korpela, Andreas Henelius, Lauri Ahonen, Arto Klami, Kai Puolamäki,
Data Mining and Knowledge Discovery, 2016.
URL: [http://dx.doi.org/10.1007/s10618-016-0465-y](http://dx.doi.org/10.1007/s10618-016-0465-y)
The authors' version is available in this repository as [cocoreg_plain.pdf](./man/pdf/cocoreg_plain.pdf). The final publication will be available at link.springer.com.
## Usage
A minimal usage example:
```{r, message = FALSE}
library(cocoreg)
dc <- create_syn_data_toy()
ccr <- cocoreg(dc$data)
shared.by.all.df <- variation_shared_by(dc, 'all') #only on synthetic datasets
ggplot_dclst(list(observed = dc$data, shared = shared.by.all.df, cocoreg = ccr$data))
library(reshape) #importing from namespace does not work as expected
ggcompare_dclst(list(shared = shared.by.all.df, cocoreg = ccr$data))
```
## Overview
The most important functions in cocoreg are:
* `cocoreg()` which extracts shared variation from a collection of datasets
* Functions to visualize output such as `ggplot_dclst()` and `ggcompare_dclst()` for lists of data collections, `ggplot_dflst()` for lists of data.frames (i.e. one data collection) and `ggplot_df()` for a single data.frame (a dataset)
## Installation
Install the release version from CRAN:
```{r, eval = FALSE}
install.packages("cocoreg")
```
Or the development version from GitHub:
```{r, eval = FALSE}
# install.packages("devtools")
# library(devtools)
devtools::install_github("bwrc/cocoreg-r")
```