Converts the result list derived by MoPS function fit.periodic() to a data.frame.
Usage
result.as.dataframe(result.list)
Arguments
result.list
List of best fitting parameters returned by fit.periodic().
Details
This function takes as input the result list from MoPS function fit.periodic() and extracts the time course specific optimal parameters.
Value
data.frame containing the best fitting periodic parameters for each time series (rows):
columns:
ID : unique identifier
score : log-likelihood for periodic behaviour
phi : phase
lambda : period length
sigma : attenuation of the signal along the complete time series
mean : mean
amplitude : amplitude
Author(s)
Philipp Eser, Achim Tresch
Examples
y = 2*sin(seq(0,6*pi,length.out=50)+rnorm(50))
res = fit.periodic(y)
result.as.dataframe(res)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(MoPS)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/MoPS/result.as.dataframe.Rd_%03d_medium.png", width=480, height=480)
> ### Name: result.as.dataframe
> ### Title: Parameters of fitted periodic time courses.
> ### Aliases: result.as.dataframe
>
> ### ** Examples
>
>
> y = 2*sin(seq(0,6*pi,length.out=50)+rnorm(50))
> res = fit.periodic(y)
1275 linear regressions will be performed. This will take < 5 minutes.
Creating test functions ....
0 %
10 %
20 %
30 %
40 %
50 %
60 %
70 %
80 %
90 %
100 %
Fitting of test functions to data ....
0 %
100 %
Warning message:
In cor(vec, testfmatrix[[j]], use = "pairwise.complete.obs") :
the standard deviation is zero
> result.as.dataframe(res)
ID score phi lambda sigma mean amplitude
1 ID_1 0.59 4 17 0 -0.01 1.53
>
>
>
>
>
>
> dev.off()
null device
1
>