R/gen-Estimates.R

Defines functions Samples_acc Mode_acc Median_acc Mean_acc so_Estimates_create_Samples so_Estimates_set_Samples so_Estimates_get_Samples so_Estimates_create_Mode so_Estimates_set_Mode so_Estimates_get_Mode so_Estimates_create_Median so_Estimates_set_Median so_Estimates_get_Median so_Estimates_create_Mean so_Estimates_set_Mean so_Estimates_get_Mean so_Estimates_unref so_Estimates_ref so_Estimates_free so_Estimates_copy so_Estimates_new

# libsoc - Library to handle standardised output files
# Copyright (C) 2015 Rikard Nordgren
# 
# This file was autogenerated and should not be edited
# 
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
# 
# his library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
# 
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, see <http://www.gnu.org/licenses/>.

so_Estimates_new <- function() {
	obj = .Call("r_so_Estimates_new")
}

so_Estimates_copy <- function(self) {
	.Call("r_so_Estimates_copy", self)
}

so_Estimates_free <- function(self) {
	.Call("r_so_Estimates_free", self)
}

so_Estimates_ref <- function(self) {
	.Call("r_so_Estimates_ref", self)
}

so_Estimates_unref <- function(self) {
	.Call("r_so_Estimates_unref", self)
}

so_Estimates_get_Mean <- function(self) {
	.Call("r_so_Estimates_get_Mean", self)
}

so_Estimates_set_Mean <- function(self, value) {
	.Call("r_so_Estimates_set_Mean", self, value)
}

so_Estimates_create_Mean <- function(self) {
	.Call("r_so_Estimates_create_Mean", self)
}

so_Estimates_get_Median <- function(self) {
	.Call("r_so_Estimates_get_Median", self)
}

so_Estimates_set_Median <- function(self, value) {
	.Call("r_so_Estimates_set_Median", self, value)
}

so_Estimates_create_Median <- function(self) {
	.Call("r_so_Estimates_create_Median", self)
}

so_Estimates_get_Mode <- function(self) {
	.Call("r_so_Estimates_get_Mode", self)
}

so_Estimates_set_Mode <- function(self, value) {
	.Call("r_so_Estimates_set_Mode", self, value)
}

so_Estimates_create_Mode <- function(self) {
	.Call("r_so_Estimates_create_Mode", self)
}

so_Estimates_get_Samples <- function(self) {
	.Call("r_so_Estimates_get_Samples", self)
}

so_Estimates_set_Samples <- function(self, value) {
	.Call("r_so_Estimates_set_Samples", self, value)
}

so_Estimates_create_Samples <- function(self) {
	.Call("r_so_Estimates_create_Samples", self)
}

Mean_acc <- function(value)
{
	if (!isnull(.self$.cobj)) {
		if (missing(value)) {
			so_Estimates_get_Mean(.self$.cobj)
		} else {
			if (!is(value, "data.frame")) {
				stop("object must be of type 'data.frame'")
			}
			so_Estimates_set_Mean(.self$.cobj, value)
		}
	}
}

Median_acc <- function(value)
{
	if (!isnull(.self$.cobj)) {
		if (missing(value)) {
			so_Estimates_get_Median(.self$.cobj)
		} else {
			if (!is(value, "data.frame")) {
				stop("object must be of type 'data.frame'")
			}
			so_Estimates_set_Median(.self$.cobj, value)
		}
	}
}

Mode_acc <- function(value)
{
	if (!isnull(.self$.cobj)) {
		if (missing(value)) {
			so_Estimates_get_Mode(.self$.cobj)
		} else {
			if (!is(value, "data.frame")) {
				stop("object must be of type 'data.frame'")
			}
			so_Estimates_set_Mode(.self$.cobj, value)
		}
	}
}

Samples_acc <- function(value)
{
	if (!isnull(.self$.cobj)) {
		if (missing(value)) {
			so_Estimates_get_Samples(.self$.cobj)
		} else {
			if (!is(value, "data.frame")) {
				stop("object must be of type 'data.frame'")
			}
			so_Estimates_set_Samples(.self$.cobj, value)
		}
	}
}

so_Estimates = setRefClass("so_Estimates",
	fields=list(
		Mean = Mean_acc,
		Median = Median_acc,
		Mode = Mode_acc,
		Samples = Samples_acc,
		.cobj = "externalptr"
	),
	methods=list(
		copy = function() {
			copy = so_Estimates_copy(.self$.cobj)
			so_Estimates$new(cobj=copy)
		},
		initialize = function(cobj) {
			if (missing(cobj)) {
				.cobj <<- so_Estimates_new()
			} else {
				.cobj <<- cobj
			}
		},
		finalize = function() {
			so_Estimates_unref(.self$.cobj)
		}
	)
)

Try the libsoc package in your browser

Any scripts or data that you put into this service are public.

libsoc documentation built on Feb. 3, 2022, 5:07 p.m.