diff --git a/NAMESPACE b/NAMESPACE index 903031d..c9f3172 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -27,6 +27,7 @@ export(simuloiAlleeli) export(size) export(strcmp) export(suoritaMuutos) +export(testaaOnkoKunnollinenBapsData) export(times) export(uigetfile) export(uiputfile) diff --git a/R/greedyMix.R b/R/greedyMix.R index 39c99ac..fa88ff1 100644 --- a/R/greedyMix.R +++ b/R/greedyMix.R @@ -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 } diff --git a/R/testaaGenePopData.R b/R/testaaGenePopData.R index 4540493..5654dcf 100644 --- a/R/testaaGenePopData.R +++ b/R/testaaGenePopData.R @@ -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. diff --git a/man/greedyMix.Rd b/man/greedyMix.Rd index 8909046..b8a04cb 100644 --- a/man/greedyMix.Rd +++ b/man/greedyMix.Rd @@ -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 diff --git a/man/testaaGenePopData.Rd b/man/testaaGenePopData.Rd index 167b33c..1f8864d 100644 --- a/man/testaaGenePopData.Rd +++ b/man/testaaGenePopData.Rd @@ -6,6 +6,9 @@ \usage{ testaaGenePopData(tiedostonNimi) } +\arguments{ +\item{tiedostonNimi}{Filename} +} \description{ Tests GenePop data } diff --git a/man/testaaOnkoKunnollinenBapsData.Rd b/man/testaaOnkoKunnollinenBapsData.Rd new file mode 100644 index 0000000..1dc5d51 --- /dev/null +++ b/man/testaaOnkoKunnollinenBapsData.Rd @@ -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 +} diff --git a/tests/testthat/test.greedyMix.R b/tests/testthat/test.greedyMix.R new file mode 100644 index 0000000..18e72e7 --- /dev/null +++ b/tests/testthat/test.greedyMix.R @@ -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 +# ) \ No newline at end of file