Improved documentation

This commit is contained in:
Waldir Leoncio 2020-06-24 11:48:23 +02:00
parent 8e93e6305e
commit 6b36b5c843
7 changed files with 42 additions and 3 deletions

View file

@ -27,6 +27,7 @@ export(simuloiAlleeli)
export(size) export(size)
export(strcmp) export(strcmp)
export(suoritaMuutos) export(suoritaMuutos)
export(testaaOnkoKunnollinenBapsData)
export(times) export(times)
export(uigetfile) export(uigetfile)
export(uiputfile) export(uiputfile)

View file

@ -1,7 +1,9 @@
#' @title Clustering of individuals #' @title Clustering of individuals
#' @param tietue Record #' @param tietue File
#' @param format Format of the data ("BAPS", "GenePop" or "Preprocessed") #' @param format Format of the data ("BAPS", "GenePop" or "Preprocessed")
#' @param savePreProcessed Save the pre-processed data? #' @param savePreProcessed Save the pre-processed data?
#' @param filePreProcessed Is the file already processed?
#' @importFrom utils read.delim
#' @export #' @export
greedyMix <- function( greedyMix <- function(
tietue, tietue,
@ -51,7 +53,9 @@ greedyMix <- function(
stop('Invalid alternative') stop('Invalid alternative')
} else if (input_type_name == 'BAPS-format') { } else if (input_type_name == 'BAPS-format') {
if (!is(tietue, "character")) { if (!is(tietue, "character")) {
pathname_filename <- uigetfile("*.txt", "Loaddata in BAPS-format") pathname_filename <- uigetfile(
"*.txt", "Load data in BAPS-format"
)
} else { } else {
pathname_filename <- tietue pathname_filename <- tietue
} }

View file

@ -1,4 +1,5 @@
#' @title Tests GenePop data #' @title Tests GenePop data
#' @param tiedostonNimi Filename
testaaGenePopData <- function(tiedostonNimi) { testaaGenePopData <- function(tiedostonNimi) {
# kunnossa == 0, jos data ei ole kelvollinen genePop data. # kunnossa == 0, jos data ei ole kelvollinen genePop data.
# Muussa tapauksessa kunnossa == 1. # Muussa tapauksessa kunnossa == 1.

View file

@ -12,11 +12,13 @@ greedyMix(
) )
} }
\arguments{ \arguments{
\item{tietue}{Record} \item{tietue}{File}
\item{format}{Format of the data ("BAPS", "GenePop" or "Preprocessed")} \item{format}{Format of the data ("BAPS", "GenePop" or "Preprocessed")}
\item{savePreProcessed}{Save the pre-processed data?} \item{savePreProcessed}{Save the pre-processed data?}
\item{filePreProcessed}{Is the file already processed?}
} }
\description{ \description{
Clustering of individuals Clustering of individuals

View file

@ -6,6 +6,9 @@
\usage{ \usage{
testaaGenePopData(tiedostonNimi) testaaGenePopData(tiedostonNimi)
} }
\arguments{
\item{tiedostonNimi}{Filename}
}
\description{ \description{
Tests GenePop data Tests GenePop data
} }

View 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
}

View 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
# )