Improved documentation
This commit is contained in:
parent
8e93e6305e
commit
6b36b5c843
7 changed files with 42 additions and 3 deletions
|
|
@ -27,6 +27,7 @@ export(simuloiAlleeli)
|
|||
export(size)
|
||||
export(strcmp)
|
||||
export(suoritaMuutos)
|
||||
export(testaaOnkoKunnollinenBapsData)
|
||||
export(times)
|
||||
export(uigetfile)
|
||||
export(uiputfile)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
#' @title Clustering of individuals
|
||||
#' @param tietue Record
|
||||
#' @param tietue File
|
||||
#' @param format Format of the data ("BAPS", "GenePop" or "Preprocessed")
|
||||
#' @param savePreProcessed Save the pre-processed data?
|
||||
#' @param filePreProcessed Is the file already processed?
|
||||
#' @importFrom utils read.delim
|
||||
#' @export
|
||||
greedyMix <- function(
|
||||
tietue,
|
||||
|
|
@ -51,7 +53,9 @@ greedyMix <- function(
|
|||
stop('Invalid alternative')
|
||||
} else if (input_type_name == 'BAPS-format') {
|
||||
if (!is(tietue, "character")) {
|
||||
pathname_filename <- uigetfile("*.txt", "Loaddata in BAPS-format")
|
||||
pathname_filename <- uigetfile(
|
||||
"*.txt", "Load data in BAPS-format"
|
||||
)
|
||||
} else {
|
||||
pathname_filename <- tietue
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#' @title Tests GenePop data
|
||||
#' @param tiedostonNimi Filename
|
||||
testaaGenePopData <- function(tiedostonNimi) {
|
||||
# kunnossa == 0, jos data ei ole kelvollinen genePop data.
|
||||
# Muussa tapauksessa kunnossa == 1.
|
||||
|
|
|
|||
|
|
@ -12,11 +12,13 @@ greedyMix(
|
|||
)
|
||||
}
|
||||
\arguments{
|
||||
\item{tietue}{Record}
|
||||
\item{tietue}{File}
|
||||
|
||||
\item{format}{Format of the data ("BAPS", "GenePop" or "Preprocessed")}
|
||||
|
||||
\item{savePreProcessed}{Save the pre-processed data?}
|
||||
|
||||
\item{filePreProcessed}{Is the file already processed?}
|
||||
}
|
||||
\description{
|
||||
Clustering of individuals
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@
|
|||
\usage{
|
||||
testaaGenePopData(tiedostonNimi)
|
||||
}
|
||||
\arguments{
|
||||
\item{tiedostonNimi}{Filename}
|
||||
}
|
||||
\description{
|
||||
Tests GenePop data
|
||||
}
|
||||
|
|
|
|||
17
man/testaaOnkoKunnollinenBapsData.Rd
Normal file
17
man/testaaOnkoKunnollinenBapsData.Rd
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/testaaOnkoKunnollinenBapsData.R
|
||||
\name{testaaOnkoKunnollinenBapsData}
|
||||
\alias{testaaOnkoKunnollinenBapsData}
|
||||
\title{TestBAPS data}
|
||||
\usage{
|
||||
testaaOnkoKunnollinenBapsData(data)
|
||||
}
|
||||
\arguments{
|
||||
\item{data}{dataset}
|
||||
}
|
||||
\value{
|
||||
ninds
|
||||
}
|
||||
\description{
|
||||
Test if loaded BAPS data is proper
|
||||
}
|
||||
11
tests/testthat/test.greedyMix.R
Normal file
11
tests/testthat/test.greedyMix.R
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# library(devtools)#TEMP
|
||||
# library(testthat)#TEMP
|
||||
# library(rBAPS)#TEMP
|
||||
|
||||
context("Opening files on greedyMix")
|
||||
|
||||
# greedyMix(
|
||||
# tietue = "data/ExamplesDataFormatting/Example baseline data in GENEPOP format for Trained clustering.txt",
|
||||
# format = "GenePop",
|
||||
# savePreProcessed = FALSE
|
||||
# )
|
||||
Loading…
Add table
Reference in a new issue