Last updated on 2020-02-19 10:49:10 CET.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 1.0 | 5.17 | 26.38 | 31.55 | ERROR | |
r-devel-linux-x86_64-debian-gcc | 1.0 | 3.91 | 20.54 | 24.45 | ERROR | |
r-devel-linux-x86_64-fedora-clang | 1.0 | 40.63 | ERROR | |||
r-devel-linux-x86_64-fedora-gcc | 1.0 | 38.97 | ERROR | |||
r-devel-windows-ix86+x86_64 | 1.0 | 15.00 | 50.00 | 65.00 | NOTE | |
r-devel-windows-ix86+x86_64-gcc8 | 1.0 | 20.00 | 48.00 | 68.00 | NOTE | |
r-patched-linux-x86_64 | 1.0 | 4.34 | 27.14 | 31.48 | NOTE | |
r-patched-solaris-x86 | 1.0 | 59.80 | NOTE | |||
r-release-linux-x86_64 | 1.0 | 4.21 | 27.47 | 31.68 | NOTE | |
r-release-windows-ix86+x86_64 | 1.0 | 14.00 | 64.00 | 78.00 | NOTE | |
r-release-osx-x86_64 | 1.0 | NOTE | ||||
r-oldrel-windows-ix86+x86_64 | 1.0 | 13.00 | 74.00 | 87.00 | NOTE | |
r-oldrel-osx-x86_64 | 1.0 | NOTE |
Version: 1.0
Check: R code for possible problems
Result: NOTE
cvsmac: no visible global function definition for 'predict'
Undefined global functions or variables:
predict
Consider adding
importFrom("stats", "predict")
to your NAMESPACE file.
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-ix86+x86_64, r-devel-windows-ix86+x86_64-gcc8, r-patched-linux-x86_64, r-patched-solaris-x86, r-release-linux-x86_64, r-release-windows-ix86+x86_64, r-release-osx-x86_64, r-oldrel-windows-ix86+x86_64, r-oldrel-osx-x86_64
Version: 1.0
Check: examples
Result: ERROR
Running examples in 'smac-Ex.R' failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: cvsmac
> ### Title: A cross validation function for smac.
> ### Aliases: cvsmac
>
> ### ** Examples
>
> data(ex1.data)
> cvsmac(ex1.data$ex1.x,ex1.data$ex1.y,loss="p",nlambda=30)
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
smac
--- call from context ---
psvmway1(x, y, weight, nlambda, lambda.min, standardize, epsilon)
--- call from argument ---
if (class(tempbeta) == "numeric") {
tempbeta = (as.matrix(tempbeta))
}
--- R stacktrace ---
where 1: psvmway1(x, y, weight, nlambda, lambda.min, standardize, epsilon)
where 2: angle_psvm(x, y, weight, nlambda, lambda.min, lambda, standardize,
epsilon)
where 3: smac(y = y, x = x, nlambda = 100, weight = weight, ...)
where 4: cvsmac(ex1.data$ex1.x, ex1.data$ex1.y, loss = "p", nlambda = 30)
--- value of length: 2 type: logical ---
[1] FALSE FALSE
--- function from context ---
function (x, y, weight, nlambda, lambda.min, standardize, epsilon)
{
nobs = nrow(x)
np = ncol(x)
x.flag = 0
x.name = colnames(x)
if (is.null(x.name)) {
x.flag = 1
x.name = paste("V", seq(np), sep = "")
}
x = as.matrix(x)
if (standardize) {
x.train = scale(x)
center = attributes(x.train)$`scaled:center`
scale = attributes(x.train)$`scaled:scale`
}
else {
x.train = x
}
y.flag = 0
if (is.numeric(y)) {
y.flag = 1
}
y.name = levels(factor(y))
k = length(y.name)
if (as.integer(k) < 2)
stop("y should be of more than 1 class")
kminus = k - 1
y.temp = as.factor(y)
y.train = rep(0, length(y))
for (ii in 1:k) {
y.train[which(y.temp %in% y.name[ii])] = ii
}
Y.matrix = Y.matrix.gen(y.train, k)
if (missing(weight)) {
weight = rep(1, nobs)
}
warmbeta = matrix(rep(0, ((np + 1) * kminus)), (np + 1),
kminus)
warminner = rep(0, nobs)
aa = .C("anglepsvmstart", as.vector((x.train)), as.vector((Y.matrix)),
as.integer(kminus), as.integer(nobs), as.integer(np),
as.double(epsilon), as.double(weight), as.vector((warmbeta)),
as.double(warminner), betaout = as.vector(matrix(rep(0,
((np + 1) * kminus)), (np + 1), kminus)), innerout = as.double(rep(0,
nobs)), PACKAGE = "smac")
warmbeta = aa$betaout
warminner = aa$innerout
tempbetaout = matrix(warmbeta, (np + 1), (k - 1))
tempbeta0 = tempbetaout[1, ]
tempbeta = tempbetaout[-1, ]
zerofd = matrix(0, np, kminus)
tempfd = firpsvm(warminner)
for (p in 1:np) {
for (q in 1:kminus) {
zerofd[p, q] = sum(tempfd * x.train[, p] * Y.matrix[,
q] * weight)/nobs
}
}
if (standardize) {
tempbeta0 = as.vector(tempbeta0 - t(as.matrix(center/scale)) %*%
tempbeta)
tempbeta = tempbeta/scale
}
if (class(tempbeta) == "numeric") {
tempbeta = (as.matrix(tempbeta))
}
rownames(tempbeta) = x.name
lambda.trace = max(abs(zerofd))
beta0.trace = list(tempbeta0)
beta.trace = list(tempbeta)
if (as.integer(nlambda) > 1) {
lambda.panel = exp(seq(log(lambda.trace), log(lambda.trace *
lambda.min), len = nlambda))[-1]
for (zz in 1:length(lambda.panel)) {
aa = .C("anglepsvm", as.vector((x.train)), as.vector((Y.matrix)),
as.integer(kminus), as.integer(nobs), as.integer(np),
as.double(lambda.panel[zz]), as.double(epsilon),
as.double(weight), as.vector((warmbeta)), as.double(warminner),
betaout = as.vector(matrix(rep(0, ((np + 1) *
kminus)), (np + 1), kminus)), innerout = as.double(rep(0,
nobs)), PACKAGE = "smac")
warmbeta = aa$betaout
warminner = aa$innerout
tempbetaout = matrix(warmbeta, (np + 1), (k - 1))
tempbeta0 = tempbetaout[1, ]
tempbeta = tempbetaout[-1, ]
if (is.na(sum(aa$betaout)) | is.nan(sum(aa$betaout))) {
break
}
if (standardize) {
tempbeta0 = as.vector(tempbeta0 - t(as.matrix(center/scale)) %*%
tempbeta)
tempbeta = tempbeta/scale
}
if (class(tempbeta) == "numeric") {
tempbeta = (as.matrix(tempbeta))
}
rownames(tempbeta) = x.name
lambda.trace = c(lambda.trace, lambda.panel[zz])
beta0.trace = c(beta0.trace, list(tempbeta0))
beta.trace = c(beta.trace, list(tempbeta))
}
}
if (y.flag == 1) {
y.name = as.numeric(y.name)
}
if (x.flag) {
x = data.frame(x)
colnames(x) = x.name
}
z = list(x = x, y = y, weight = weight, standardize = standardize,
epsilon = epsilon, k = k, x.name = x.name, y.name = y.name,
lambda = lambda.trace, beta0 = beta0.trace, beta = beta.trace,
loss = "psvm", way = 1)
return(z)
}
<bytecode: 0x144a7f0>
<environment: namespace:smac>
--- function search by body ---
Function psvmway1 in namespace smac has this body.
----------- END OF FAILURE REPORT --------------
Error in if (class(tempbeta) == "numeric") { :
the condition has length > 1
Calls: cvsmac -> smac -> angle_psvm -> psvmway1
Execution halted
Flavor: r-devel-linux-x86_64-debian-clang
Version: 1.0
Check: examples
Result: ERROR
Running examples in ‘smac-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: cvsmac
> ### Title: A cross validation function for smac.
> ### Aliases: cvsmac
>
> ### ** Examples
>
> data(ex1.data)
> cvsmac(ex1.data$ex1.x,ex1.data$ex1.y,loss="p",nlambda=30)
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
smac
--- call from context ---
psvmway1(x, y, weight, nlambda, lambda.min, standardize, epsilon)
--- call from argument ---
if (class(tempbeta) == "numeric") {
tempbeta = (as.matrix(tempbeta))
}
--- R stacktrace ---
where 1: psvmway1(x, y, weight, nlambda, lambda.min, standardize, epsilon)
where 2: angle_psvm(x, y, weight, nlambda, lambda.min, lambda, standardize,
epsilon)
where 3: smac(y = y, x = x, nlambda = 100, weight = weight, ...)
where 4: cvsmac(ex1.data$ex1.x, ex1.data$ex1.y, loss = "p", nlambda = 30)
--- value of length: 2 type: logical ---
[1] FALSE FALSE
--- function from context ---
function (x, y, weight, nlambda, lambda.min, standardize, epsilon)
{
nobs = nrow(x)
np = ncol(x)
x.flag = 0
x.name = colnames(x)
if (is.null(x.name)) {
x.flag = 1
x.name = paste("V", seq(np), sep = "")
}
x = as.matrix(x)
if (standardize) {
x.train = scale(x)
center = attributes(x.train)$`scaled:center`
scale = attributes(x.train)$`scaled:scale`
}
else {
x.train = x
}
y.flag = 0
if (is.numeric(y)) {
y.flag = 1
}
y.name = levels(factor(y))
k = length(y.name)
if (as.integer(k) < 2)
stop("y should be of more than 1 class")
kminus = k - 1
y.temp = as.factor(y)
y.train = rep(0, length(y))
for (ii in 1:k) {
y.train[which(y.temp %in% y.name[ii])] = ii
}
Y.matrix = Y.matrix.gen(y.train, k)
if (missing(weight)) {
weight = rep(1, nobs)
}
warmbeta = matrix(rep(0, ((np + 1) * kminus)), (np + 1),
kminus)
warminner = rep(0, nobs)
aa = .C("anglepsvmstart", as.vector((x.train)), as.vector((Y.matrix)),
as.integer(kminus), as.integer(nobs), as.integer(np),
as.double(epsilon), as.double(weight), as.vector((warmbeta)),
as.double(warminner), betaout = as.vector(matrix(rep(0,
((np + 1) * kminus)), (np + 1), kminus)), innerout = as.double(rep(0,
nobs)), PACKAGE = "smac")
warmbeta = aa$betaout
warminner = aa$innerout
tempbetaout = matrix(warmbeta, (np + 1), (k - 1))
tempbeta0 = tempbetaout[1, ]
tempbeta = tempbetaout[-1, ]
zerofd = matrix(0, np, kminus)
tempfd = firpsvm(warminner)
for (p in 1:np) {
for (q in 1:kminus) {
zerofd[p, q] = sum(tempfd * x.train[, p] * Y.matrix[,
q] * weight)/nobs
}
}
if (standardize) {
tempbeta0 = as.vector(tempbeta0 - t(as.matrix(center/scale)) %*%
tempbeta)
tempbeta = tempbeta/scale
}
if (class(tempbeta) == "numeric") {
tempbeta = (as.matrix(tempbeta))
}
rownames(tempbeta) = x.name
lambda.trace = max(abs(zerofd))
beta0.trace = list(tempbeta0)
beta.trace = list(tempbeta)
if (as.integer(nlambda) > 1) {
lambda.panel = exp(seq(log(lambda.trace), log(lambda.trace *
lambda.min), len = nlambda))[-1]
for (zz in 1:length(lambda.panel)) {
aa = .C("anglepsvm", as.vector((x.train)), as.vector((Y.matrix)),
as.integer(kminus), as.integer(nobs), as.integer(np),
as.double(lambda.panel[zz]), as.double(epsilon),
as.double(weight), as.vector((warmbeta)), as.double(warminner),
betaout = as.vector(matrix(rep(0, ((np + 1) *
kminus)), (np + 1), kminus)), innerout = as.double(rep(0,
nobs)), PACKAGE = "smac")
warmbeta = aa$betaout
warminner = aa$innerout
tempbetaout = matrix(warmbeta, (np + 1), (k - 1))
tempbeta0 = tempbetaout[1, ]
tempbeta = tempbetaout[-1, ]
if (is.na(sum(aa$betaout)) | is.nan(sum(aa$betaout))) {
break
}
if (standardize) {
tempbeta0 = as.vector(tempbeta0 - t(as.matrix(center/scale)) %*%
tempbeta)
tempbeta = tempbeta/scale
}
if (class(tempbeta) == "numeric") {
tempbeta = (as.matrix(tempbeta))
}
rownames(tempbeta) = x.name
lambda.trace = c(lambda.trace, lambda.panel[zz])
beta0.trace = c(beta0.trace, list(tempbeta0))
beta.trace = c(beta.trace, list(tempbeta))
}
}
if (y.flag == 1) {
y.name = as.numeric(y.name)
}
if (x.flag) {
x = data.frame(x)
colnames(x) = x.name
}
z = list(x = x, y = y, weight = weight, standardize = standardize,
epsilon = epsilon, k = k, x.name = x.name, y.name = y.name,
lambda = lambda.trace, beta0 = beta0.trace, beta = beta.trace,
loss = "psvm", way = 1)
return(z)
}
<bytecode: 0x558961bfbd18>
<environment: namespace:smac>
--- function search by body ---
Function psvmway1 in namespace smac has this body.
----------- END OF FAILURE REPORT --------------
Error in if (class(tempbeta) == "numeric") { :
the condition has length > 1
Calls: cvsmac -> smac -> angle_psvm -> psvmway1
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 1.0
Check: compiled code
Result: NOTE
File ‘smac/libs/smac.so’:
Found no calls to: ‘R_registerRoutines’, ‘R_useDynamicSymbols’
It is good practice to register native routines and to disable symbol
search.
See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual.
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc
Version: 1.0
Check: examples
Result: ERROR
Running examples in ‘smac-Ex.R’ failed
The error most likely occurred in:
> ### Name: cvsmac
> ### Title: A cross validation function for smac.
> ### Aliases: cvsmac
>
> ### ** Examples
>
> data(ex1.data)
> cvsmac(ex1.data$ex1.x,ex1.data$ex1.y,loss="p",nlambda=30)
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
smac
--- call from context ---
psvmway1(x, y, weight, nlambda, lambda.min, standardize, epsilon)
--- call from argument ---
if (class(tempbeta) == "numeric") {
tempbeta = (as.matrix(tempbeta))
}
--- R stacktrace ---
where 1: psvmway1(x, y, weight, nlambda, lambda.min, standardize, epsilon)
where 2: angle_psvm(x, y, weight, nlambda, lambda.min, lambda, standardize,
epsilon)
where 3: smac(y = y, x = x, nlambda = 100, weight = weight, ...)
where 4: cvsmac(ex1.data$ex1.x, ex1.data$ex1.y, loss = "p", nlambda = 30)
--- value of length: 2 type: logical ---
[1] FALSE FALSE
--- function from context ---
function (x, y, weight, nlambda, lambda.min, standardize, epsilon)
{
nobs = nrow(x)
np = ncol(x)
x.flag = 0
x.name = colnames(x)
if (is.null(x.name)) {
x.flag = 1
x.name = paste("V", seq(np), sep = "")
}
x = as.matrix(x)
if (standardize) {
x.train = scale(x)
center = attributes(x.train)$`scaled:center`
scale = attributes(x.train)$`scaled:scale`
}
else {
x.train = x
}
y.flag = 0
if (is.numeric(y)) {
y.flag = 1
}
y.name = levels(factor(y))
k = length(y.name)
if (as.integer(k) < 2)
stop("y should be of more than 1 class")
kminus = k - 1
y.temp = as.factor(y)
y.train = rep(0, length(y))
for (ii in 1:k) {
y.train[which(y.temp %in% y.name[ii])] = ii
}
Y.matrix = Y.matrix.gen(y.train, k)
if (missing(weight)) {
weight = rep(1, nobs)
}
warmbeta = matrix(rep(0, ((np + 1) * kminus)), (np + 1),
kminus)
warminner = rep(0, nobs)
aa = .C("anglepsvmstart", as.vector((x.train)), as.vector((Y.matrix)),
as.integer(kminus), as.integer(nobs), as.integer(np),
as.double(epsilon), as.double(weight), as.vector((warmbeta)),
as.double(warminner), betaout = as.vector(matrix(rep(0,
((np + 1) * kminus)), (np + 1), kminus)), innerout = as.double(rep(0,
nobs)), PACKAGE = "smac")
warmbeta = aa$betaout
warminner = aa$innerout
tempbetaout = matrix(warmbeta, (np + 1), (k - 1))
tempbeta0 = tempbetaout[1, ]
tempbeta = tempbetaout[-1, ]
zerofd = matrix(0, np, kminus)
tempfd = firpsvm(warminner)
for (p in 1:np) {
for (q in 1:kminus) {
zerofd[p, q] = sum(tempfd * x.train[, p] * Y.matrix[,
q] * weight)/nobs
}
}
if (standardize) {
tempbeta0 = as.vector(tempbeta0 - t(as.matrix(center/scale)) %*%
tempbeta)
tempbeta = tempbeta/scale
}
if (class(tempbeta) == "numeric") {
tempbeta = (as.matrix(tempbeta))
}
rownames(tempbeta) = x.name
lambda.trace = max(abs(zerofd))
beta0.trace = list(tempbeta0)
beta.trace = list(tempbeta)
if (as.integer(nlambda) > 1) {
lambda.panel = exp(seq(log(lambda.trace), log(lambda.trace *
lambda.min), len = nlambda))[-1]
for (zz in 1:length(lambda.panel)) {
aa = .C("anglepsvm", as.vector((x.train)), as.vector((Y.matrix)),
as.integer(kminus), as.integer(nobs), as.integer(np),
as.double(lambda.panel[zz]), as.double(epsilon),
as.double(weight), as.vector((warmbeta)), as.double(warminner),
betaout = as.vector(matrix(rep(0, ((np + 1) *
kminus)), (np + 1), kminus)), innerout = as.double(rep(0,
nobs)), PACKAGE = "smac")
warmbeta = aa$betaout
warminner = aa$innerout
tempbetaout = matrix(warmbeta, (np + 1), (k - 1))
tempbeta0 = tempbetaout[1, ]
tempbeta = tempbetaout[-1, ]
if (is.na(sum(aa$betaout)) | is.nan(sum(aa$betaout))) {
break
}
if (standardize) {
tempbeta0 = as.vector(tempbeta0 - t(as.matrix(center/scale)) %*%
tempbeta)
tempbeta = tempbeta/scale
}
if (class(tempbeta) == "numeric") {
tempbeta = (as.matrix(tempbeta))
}
rownames(tempbeta) = x.name
lambda.trace = c(lambda.trace, lambda.panel[zz])
beta0.trace = c(beta0.trace, list(tempbeta0))
beta.trace = c(beta.trace, list(tempbeta))
}
}
if (y.flag == 1) {
y.name = as.numeric(y.name)
}
if (x.flag) {
x = data.frame(x)
colnames(x) = x.name
}
z = list(x = x, y = y, weight = weight, standardize = standardize,
epsilon = epsilon, k = k, x.name = x.name, y.name = y.name,
lambda = lambda.trace, beta0 = beta0.trace, beta = beta.trace,
loss = "psvm", way = 1)
return(z)
}
<bytecode: 0x2dc3b30>
<environment: namespace:smac>
--- function search by body ---
Function psvmway1 in namespace smac has this body.
----------- END OF FAILURE REPORT --------------
Error in if (class(tempbeta) == "numeric") { :
the condition has length > 1
Calls: cvsmac -> smac -> angle_psvm -> psvmway1
Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang
Version: 1.0
Check: examples
Result: ERROR
Running examples in ‘smac-Ex.R’ failed
The error most likely occurred in:
> ### Name: cvsmac
> ### Title: A cross validation function for smac.
> ### Aliases: cvsmac
>
> ### ** Examples
>
> data(ex1.data)
> cvsmac(ex1.data$ex1.x,ex1.data$ex1.y,loss="p",nlambda=30)
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
smac
--- call from context ---
psvmway1(x, y, weight, nlambda, lambda.min, standardize, epsilon)
--- call from argument ---
if (class(tempbeta) == "numeric") {
tempbeta = (as.matrix(tempbeta))
}
--- R stacktrace ---
where 1: psvmway1(x, y, weight, nlambda, lambda.min, standardize, epsilon)
where 2: angle_psvm(x, y, weight, nlambda, lambda.min, lambda, standardize,
epsilon)
where 3: smac(y = y, x = x, nlambda = 100, weight = weight, ...)
where 4: cvsmac(ex1.data$ex1.x, ex1.data$ex1.y, loss = "p", nlambda = 30)
--- value of length: 2 type: logical ---
[1] FALSE FALSE
--- function from context ---
function (x, y, weight, nlambda, lambda.min, standardize, epsilon)
{
nobs = nrow(x)
np = ncol(x)
x.flag = 0
x.name = colnames(x)
if (is.null(x.name)) {
x.flag = 1
x.name = paste("V", seq(np), sep = "")
}
x = as.matrix(x)
if (standardize) {
x.train = scale(x)
center = attributes(x.train)$`scaled:center`
scale = attributes(x.train)$`scaled:scale`
}
else {
x.train = x
}
y.flag = 0
if (is.numeric(y)) {
y.flag = 1
}
y.name = levels(factor(y))
k = length(y.name)
if (as.integer(k) < 2)
stop("y should be of more than 1 class")
kminus = k - 1
y.temp = as.factor(y)
y.train = rep(0, length(y))
for (ii in 1:k) {
y.train[which(y.temp %in% y.name[ii])] = ii
}
Y.matrix = Y.matrix.gen(y.train, k)
if (missing(weight)) {
weight = rep(1, nobs)
}
warmbeta = matrix(rep(0, ((np + 1) * kminus)), (np + 1),
kminus)
warminner = rep(0, nobs)
aa = .C("anglepsvmstart", as.vector((x.train)), as.vector((Y.matrix)),
as.integer(kminus), as.integer(nobs), as.integer(np),
as.double(epsilon), as.double(weight), as.vector((warmbeta)),
as.double(warminner), betaout = as.vector(matrix(rep(0,
((np + 1) * kminus)), (np + 1), kminus)), innerout = as.double(rep(0,
nobs)), PACKAGE = "smac")
warmbeta = aa$betaout
warminner = aa$innerout
tempbetaout = matrix(warmbeta, (np + 1), (k - 1))
tempbeta0 = tempbetaout[1, ]
tempbeta = tempbetaout[-1, ]
zerofd = matrix(0, np, kminus)
tempfd = firpsvm(warminner)
for (p in 1:np) {
for (q in 1:kminus) {
zerofd[p, q] = sum(tempfd * x.train[, p] * Y.matrix[,
q] * weight)/nobs
}
}
if (standardize) {
tempbeta0 = as.vector(tempbeta0 - t(as.matrix(center/scale)) %*%
tempbeta)
tempbeta = tempbeta/scale
}
if (class(tempbeta) == "numeric") {
tempbeta = (as.matrix(tempbeta))
}
rownames(tempbeta) = x.name
lambda.trace = max(abs(zerofd))
beta0.trace = list(tempbeta0)
beta.trace = list(tempbeta)
if (as.integer(nlambda) > 1) {
lambda.panel = exp(seq(log(lambda.trace), log(lambda.trace *
lambda.min), len = nlambda))[-1]
for (zz in 1:length(lambda.panel)) {
aa = .C("anglepsvm", as.vector((x.train)), as.vector((Y.matrix)),
as.integer(kminus), as.integer(nobs), as.integer(np),
as.double(lambda.panel[zz]), as.double(epsilon),
as.double(weight), as.vector((warmbeta)), as.double(warminner),
betaout = as.vector(matrix(rep(0, ((np + 1) *
kminus)), (np + 1), kminus)), innerout = as.double(rep(0,
nobs)), PACKAGE = "smac")
warmbeta = aa$betaout
warminner = aa$innerout
tempbetaout = matrix(warmbeta, (np + 1), (k - 1))
tempbeta0 = tempbetaout[1, ]
tempbeta = tempbetaout[-1, ]
if (is.na(sum(aa$betaout)) | is.nan(sum(aa$betaout))) {
break
}
if (standardize) {
tempbeta0 = as.vector(tempbeta0 - t(as.matrix(center/scale)) %*%
tempbeta)
tempbeta = tempbeta/scale
}
if (class(tempbeta) == "numeric") {
tempbeta = (as.matrix(tempbeta))
}
rownames(tempbeta) = x.name
lambda.trace = c(lambda.trace, lambda.panel[zz])
beta0.trace = c(beta0.trace, list(tempbeta0))
beta.trace = c(beta.trace, list(tempbeta))
}
}
if (y.flag == 1) {
y.name = as.numeric(y.name)
}
if (x.flag) {
x = data.frame(x)
colnames(x) = x.name
}
z = list(x = x, y = y, weight = weight, standardize = standardize,
epsilon = epsilon, k = k, x.name = x.name, y.name = y.name,
lambda = lambda.trace, beta0 = beta0.trace, beta = beta.trace,
loss = "psvm", way = 1)
return(z)
}
<bytecode: 0x16d4c28>
<environment: namespace:smac>
--- function search by body ---
Function psvmway1 in namespace smac has this body.
----------- END OF FAILURE REPORT --------------
Error in if (class(tempbeta) == "numeric") { :
the condition has length > 1
Calls: cvsmac -> smac -> angle_psvm -> psvmway1
Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc