zarquon42b / morpho Goto Github PK
View Code? Open in Web Editor NEWR-package providing a toolset for (3D-based) Geometric Morphometrics
R-package providing a toolset for (3D-based) Geometric Morphometrics
Expected behaviour: Calling align2procSym on the same data used to calculate the PCs does not return the same rotated data. align2procSym
calls a rigid transformation to the mean shape, so I expected the same rotated data
require(Morpho)
data(boneData)
set.seed(1)
proc <- procSym(boneLM)
proc_align <- align2procSym(proc,boneLM)
mean( abs(proc$orpdata[,,1] - proc_align[,,1]) )
[1] 4.115342e-05
The situation is much worse if parameters of procSym
are modified.
proc <- procSym(boneLM, scale=FALSE)
proc_align <- align2procSym(proc,boneLM)
mean( abs(proc$orpdata[,,1] - proc_align[,,1]) )
[1] 0.5854814
Expected behaviour: Expected PC scores from aligned data, but this fails when sizeshape=TRUE.
library(Morpho)
data(boneData)
proc <- procSym(boneLM[,,-c(1:2)], sizeshape=TRUE)
newdata <- boneLM[,,c(1:2)]
newdataAlign <- align2procSym(proc,newdata)
scores <- getPCscores(newdataAlign,proc$PCs,proc$mshape)
Hi Stefan
I'm trying to use slider3d to resample and slide my landmarks and I can't figure out how to resolve the following error:
slided4.all <- slider3d(newpts2, SMvector= my_curves$Sliding.LMs,
+ outlines = my_curves$Curves, sur.path = "./clean_meshes", sur.name = NULL,
+ meshlist = meshlist, ignore = NULL,
+ sur.type = "ply", tol = 1e-10, deselect = FALSE, inc.check = FALSE,
+ recursive = TRUE, iterations = 3, initproc = TRUE,
+ pairedLM = 0, mc.cores = 1, bending=TRUE,
+ fixRepro = FALSE,stepsize=0.02)
Points will be initially projected onto surfaces
-------------------------------------------
Error in t.default(reprotmp$vb[1:3, ]) : argument is not a matrix
I've checked all my ply files, as well as cleaning them using Rvcg. As best as I can tell, there's some sort of issue during the projection stage? I can send you the data if you aren't immediately clear on what could be causing the issue.
Cheers
Travis
Merging primitives with complex color schemes yields this warning message:
Warning message:
In cbind(outmesh$material$color, tmpmesh$material$color) :
number of rows of result is not a multiple of vector length (arg 2)
And furthermore, the color material is a matrix with multiple rows, not a list. When I try to fix it by concatenating the colors from each individual object, the colors end up jumbled.
... discovered while trying to resolve an unrelated question
ng <- length(groups)
I don't think this line does anything. And it is confusing because the number of groups is equal to length(lev)... as previously defined within the function, and subsequently within CVAcrova.
I have an array of 3D landmark data defined as 931 x 3 x 4. For each of the four individuals (3rd dim) the first 617 rows contain soft tissue landmarks, and the following 314 rows contain hard tissue landmarks
combinedarray<-array(c(Comp1matrix,Comp2matrix,Comp3matrix,Comp4matrix), dim=c(931,3,4))
I've done a Procrustes fit for hard tissue configurations
hardproc<-procSym(combinedarray[618:931,,])
Now I need to register the complete landmark configurations (soft and hard tissue) of all specimens within the bone-tissue shape space - how do I do this?
I've tried
rot<-rotonto(hardproc$orpdata[,,1],Comp1matrix[618:931,])
and
newalign<-align2procSym(hardproc,Comp1matrix[618:931,])
but they only give me 314 rows of data, but I think I need a matrix of dimensions of the total landmarks (931)
Thanks for your help :)
Hi Stefan,
I was trying to use slider3d to minimize bending energy of the curve/surface semilandmarks.
checkLM(DataSUR,text.lm=T,point="p")
but the landmarks looks pretty good to me.> LMs_slide<-slider3d(dat.array = DataSUR, SMvector = 1:4,outlines=curlist2,surp=113:320,sur.path=".",sur.type = "ply",deselect = T)
Points will be initially projected onto surfaces
-------------------------------------------
-------------------------------------------
Projection finished
-------------------------------------------
Inital procrustes fit ...in... 0.05087185 secs
Start sliding...
-------------------------------------------
Iteration 1 ..
Error in t.default(reprotmp$vb[1:3, ]) : argument is not a matrix
specimen 2: after and before sliding.
> DataSUR_2_4<-DataSUR[1:320, 1:3, 2:4]
> LMs_slide<-slider3d(dat.array = DataSUR_2_4, SMvector = 1:4,outlines=curlist2,surp=113:320,sur.path=".",sur.type = "ply",deselect = T)
Points will be initially projected onto surfaces
-------------------------------------------
-------------------------------------------
Projection finished
-------------------------------------------
Inital procrustes fit ...in... 0.009305 secs
Start sliding...
-------------------------------------------
Iteration 1 ..
estimating sample mean shape...in... 0.00717783 secs
squared distance between means: 1.5800363915606e-05
-------------------------------------------
Iteration 2 ..
estimating sample mean shape...in... 0.007558107 secs
squared distance between means: 7.42220588217909e-06
-------------------------------------------
> checkLM(LMs_slide,text.lm=T,point="p")
viewing # 1 (return=next | p=previous | m=mark current | s=stop viewing)
viewing # 2 (return=next | p=previous | m=mark current | s=stop viewing)
Error in xyz.coords(x, y, z, recycle = TRUE) :
'x' is a list, but does not have components 'x', 'y' and 'z'
Could you help me with this issue? I can send DataSur to you if you want to test it. Thank you so much!
Best
Ruiqi
Stephan,
Morpho devtools:: install
R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.3 LTS
other attached packages:
[1] Morpho_2.7
on install:
call
is deprecated as of rlang 0.3.0call
is deprecated as of rlang 0.3.0")library(Morpho)
str(err)
List of 4
$ message: chr "call
is deprecated as of rlang 0.3.0"
$ old : NULL
$ new : NULL
$ package: NULL
We exit fine from the build and Morpho loads.
Appears to be https://github.com/r-lib/rlang/blob/master/R/cnd-signal.R line 156 ,and if I'm reading the general context correctly won't be a bigger problem till next major version, rlang 0.4.0?
Looking forward to using Morpho.
Chris
I am running into an issue with running equidistantCurve over the 20 curves of 3/100 meshes. The remaining 97 were processed successfully. I get the error for different curves for each of the three but the error is the same:
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'x' in selecting a method for function 'as.matrix': Lapack routine dsytrf returned error code 14
Error in .fx(trafo$refmat, x, trafo$coeff, threads = threads) :
Not compatible with requested type: [type=character; target=double].
Since the error occurs for some but not all curves on the same mesh I am at a loss to the cause.
I am prepared to send the offending three mesh/pts pairs, one working pair, and streamlined code that can replicate the issue bit was unable to upload it here.
Hi, I've noticed an error in meshDist that no longer allows displacement vectors to be plotted. It seems to be the case even with the example provided in the documentation:
library(Morpho)
data(nose)
longnose.mesh <- tps3d(shortnose.mesh, shortnose.lm, longnose.lm,threads=1)
mD <- meshDist(longnose.mesh, shortnose.mesh, displace = T)
The error I've consistently seen across several versions of R/Morpho is:
Error in normals[as.numeric(inds), ] : subscript out of bounds
Any insight would be appreciated!
-David
PS - Session info below in case that's useful.
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices
[4] utils datasets methods
[7] base
other attached packages:
[1] Morpho_2.8
loaded via a namespace (and not attached):
[1] Rcpp_1.0.6
[2] magrittr_2.0.1
[3] knitr_1.33
[4] MASS_7.3-54
[5] doParallel_1.0.16
[6] xtable_1.8-4
[7] lattice_0.20-44
[8] R6_2.5.0
[9] Rvcg_0.19.2
[10] rlang_0.4.11
[11] fastmap_1.1.0
[12] foreach_1.5.1
[13] tools_4.1.0
[14] parallel_4.1.0
[15] grid_4.1.0
[16] xfun_0.24
[17] miniUI_0.1.1.1
[18] ellipsis_0.3.2
[19] htmltools_0.5.1.1
[20] crosstalk_1.1.1
[21] iterators_1.0.13
[22] shinyjs_2.0.0
[23] abind_1.4-5
[24] digest_0.6.27
[25] rgl_0.106.8
[26] lifecycle_1.0.0
[27] Matrix_1.3-3
[28] shiny_1.6.0
[29] later_1.2.0
[30] promises_1.2.0.1
[31] htmlwidgets_1.5.3
[32] codetools_0.2-18
[33] manipulateWidget_0.11.0
[34] mime_0.11
[35] evaluate_0.14
[36] rmarkdown_2.11
[37] compiler_4.1.0
[38] colorRamps_2.3
[39] jsonlite_1.7.2
[40] httpuv_1.6.1
Copied from email:
Here a fully reproducible example with links grasped by the triangulation of a mesh. This is just an example with nearly non-sense links but sometimes links structure in 3D does not necessarily follow the lines of a triangulation and I think it is always desirable to draw them efficiently.
Maybe you can consider to implement my solution in lineplot()
semielliss<-function (a = 1, b = 1, c = 3, offset = 0.1, parallels = 36,
lands = 36)
{
a <- a
b <- b
c <- c
paralleli <- parallels
landmarks_per_parallelo <- lands
offset <- offset
x <- y <- z <- numeric(0)
for (i in seq(pi/2, offset, length.out = paralleli)) {
num_landmarks <- landmarks_per_parallelo
for (j in seq(2 * pi, offset, length.out = num_landmarks)) {
x <- c(x, a * sin(i) * cos(j))
y <- c(y, b * sin(i) * sin(j))
z <- c(z, c * cos(i))
}
}
x <- c(x, 0)
y <- c(y, 0)
z <- c(z, c)
res <- cbind(x, y, z)
res
}
tri2links<-function (tri)
{
res <- NULL
for (i in 1:nrow(tri)) {
resi <- list(c(tri[i, ][1], tri[i, ][2]), c(tri[i, ][1],
tri[i, ][3]), c(tri[i, ][2], tri[i, ][3]))
res <- c(res, resi)
}
res
}
library(Morpho)
library(rgl)
library(alphashape3d)
prova<-semielliss()
aprova<-ashape3d(prova,alpha=3)
plot(aprova)
close3d()
meshprova<-as.mesh3d(aprova)
links<-tri2links(t(meshprova$it))
points3d(prova)
#lineplot(prova,links) #### here you surely will have to stop before finishing as it is too slow....
close3d()
##### much faster
start <- prova[do.call(rbind, links)[, 1],]
end<- prova[do.call(rbind, links)[, 2], ]
purui <- do.call(rbind,Morpho::array2list(aperm(simplify2array(list(start,end)))))
segments3d(purui, lwd =2, col = 2)
I was trying to use rotmesh.onto and running into problems- I've attached a small R project that reproduces the issue and suggests a solution. The same behavior for getTrafo4x4 is present in getTrafo.rotonto:
Add NA omit option in qqmat (and maybe in CVA)
Hi Stefan,
As the Landmark Editors is no longer maintained, I am using the Checkpoint (updated version of Landmark Editor).
The Checkpoint no longer supported dta format when export landmarks. As I am using Morpho for the downstream analyses and it seems that it does not support nts or pts that I can export from Checkpoint. Would you mind giving me some suggestions? Is there a way to convert the nts format to dta?
Best regards
Ruiqi
Add permutation test for RV-coefficient.
Hi Stefan,
It looks like the latest build of Rvcg fails to build with clang on the R build server:
https://cran.r-project.org/web/checks/check_results_Rvcg.html
This mainly affects macosx binaries:
https://www.r-project.org/nosvn/R.check/r-release-osx-x86_64-mavericks/Rvcg-00check.html
The error looks to me like it is related to this one
which I guess would make it a missing include. But I see you already added an isnan patch here:
So it may be that you just need to test for clang as well as gcc (as commented here zarquon42b/Rvcg@e22193c#commitcomment-15195841).
I get this error both with the GIthub and the CRAN version:
Warning: S3 methods ‘vcgPlyWrite.matrix’, ‘vcgPlyWrite.mesh3d’ were declared in NAMESPACE but not found
Error in library.dynam(lib, package, package.lib) :
shared object ‘Rvcg.so’ not found
ERROR: lazy loading failed for package ‘Morpho’
* removing ‘/home/clemens/R/x86_64-pc-linux-gnu-library/3.5/Morpho’
Error in i.p(...) :
(converted from warning) installation of package ‘/tmp/Rtmp3Ij0FP/file3f7d1d09e230/Morpho_2.6.tar.gz’ had non-zero exit status
sessioninfo::session_info()
─ Session info ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
setting value
version R version 3.5.1 (2018-07-02)
os Manjaro Linux
system x86_64, linux-gnu
ui RStudio
language (EN)
collate en_US.UTF-8
ctype en_US.UTF-8
tz Europe/Berlin
date 2018-12-06
─ Packages ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
package * version date lib source
assertthat 0.2.0 2017-04-11 [1] CRAN (R 3.5.1)
backports 1.1.2 2017-12-13 [1] CRAN (R 3.5.1)
base64enc 0.1-3 2015-07-28 [1] CRAN (R 3.5.1)
callr 3.0.0 2018-08-24 [1] CRAN (R 3.5.1)
cli 1.0.1 2018-09-25 [1] CRAN (R 3.5.1)
crayon 1.3.4 2017-09-16 [1] CRAN (R 3.5.1)
curl 3.2 2018-03-28 [1] CRAN (R 3.5.1)
desc 1.2.0 2018-05-01 [1] CRAN (R 3.5.1)
devtools 2.0.1 2018-10-26 [1] CRAN (R 3.5.1)
digest 0.6.18 2018-10-10 [1] CRAN (R 3.5.1)
fs 1.2.6 2018-08-23 [1] CRAN (R 3.5.1)
glue 1.3.0 2018-07-17 [1] CRAN (R 3.5.1)
magrittr 1.5 2014-11-22 [1] CRAN (R 3.5.1)
memoise 1.1.0 2017-04-21 [1] CRAN (R 3.5.1)
pkgbuild 1.0.2 2018-10-16 [1] CRAN (R 3.5.1)
pkgload 1.0.2 2018-10-29 [1] CRAN (R 3.5.1)
prettyunits 1.0.2 2015-07-13 [1] CRAN (R 3.5.1)
processx 3.2.1 2018-12-05 [1] CRAN (R 3.5.1)
ps 1.2.1 2018-11-06 [1] CRAN (R 3.5.1)
R6 2.3.0 2018-10-04 [1] CRAN (R 3.5.1)
Rcpp 1.0.0 2018-11-07 [1] CRAN (R 3.5.1)
remotes 2.0.2 2018-10-30 [1] CRAN (R 3.5.1)
rlang 0.3.0.1 2018-10-25 [1] CRAN (R 3.5.1)
rprojroot 1.3-2 2018-01-03 [1] CRAN (R 3.5.1)
rstudioapi 0.8 2018-10-02 [1] CRAN (R 3.5.1)
sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 3.5.1)
testthat 2.0.1 2018-10-13 [1] CRAN (R 3.5.1)
usethis 1.4.0 2018-08-14 [1] CRAN (R 3.5.1)
withr 2.1.2 2018-03-15 [1] CRAN (R 3.5.1)
yaml 2.2.0 2018-07-25 [1] CRAN (R 3.5.1)
[1] /home/clemens/R/x86_64-pc-linux-gnu-library/3.5
[2] /usr/lib/R/library
Hi and thanks for this great package. I was wondering whether it is possible (or even correct) one to get Mahalanobis distances as an output in groupPCA, as returned by CVA in package Morpho. I have given the code of both functions (as well as the called CVAdists.r code) but I am too unskilled to implement such changes to the code in order to get the desired result...
Thanks
Hi,
I am trying to get the placePatch code working to semiautomatically place patch landmarks on my specimens.
I am receiving the following error:
patchtest <- placePatch(pseudatlas, testdata, path = "C:/Users/katem/OneDrive/Documents/pseudlm/meshes", prefix = '', fileext=".ply", inflate=5)
Removed 0 duplicate 73 unreferenced vertices and 4 duplicate faces
Removed 0 duplicate 73 unreferenced vertices and 4 duplicate faces
Warning messages:
1: In place.patch(dat.array, path, atlas.mesh = atlas$mesh, atlas.lm = atlas$landmarks, :
matching for specimen 1 failed with: Error in intI(j, n = x@Dim[2], dn[[2]], give.dn = FALSE): index larger than maximal 0
2: In place.patch(dat.array, path, atlas.mesh = atlas$mesh, atlas.lm = atlas$landmarks, :
matching for specimen 2 failed with: Error in intI(j, n = x@Dim[2], dn[[2]], give.dn = FALSE): index larger than maximal 0
Could you please help? Below is the code and is working up until this point...
Thank you very much, Any help would be greatly appreciated.
library(Morpho)
library(geomorph)
library(Rvcg)
library(rgl)
library(devtools)
####import 3D surface as a mesh file - my template 3d mesh#####
template.mesh <- file2mesh("C:/Users/katem/OneDrive/Documents/pseudlm/pseudlmtesttemp.ply", clean = TRUE, readcol = FALSE)
####import landmarks and the patch defined on the template###
template.pts <- read.pts("C:/Users/katem/OneDrive/Documents/pseudlm/pseudlmtesttemp.pts")
###create atlas####
###extract info about fixed landmarks, curves, patches from an atlas created by idav checkpoint####
cExtract (template.pts)
###create atlas needed for placing patch semilandmarks####
pseudatlas <- createAtlas(template.mesh, landmarks = template.pts[c(1:56,57:64,65:69,70:74,75:79,80:84,85:92),], patch = template.pts[-c(1:56,57:64,65:69,70:74,75:79,80:84,85:92),], corrCurves = list(c(57:64),c(65:69),c(70:74),c(75:79),c(80:84),c(85:92)))
plotAtlas(pseudatlas)
####read pts files from landmarks on specimens i want to place patch on####
testpts1 <- read.pts("C:/Users/katem/OneDrive/Documents/pseudlm/pseudlmtest.pts")
testpts2 <- read.pts("C:/Users/katem/OneDrive/Documents/pseudlm/pseudlmtest2.pts")
cExtract(testpts1)
cExtract(testpts2)
####create landmark array for fixed landmarks ####
testdata <- bindArr(testpts1, testpts2, along=3)
dimnames(testdata)[[3]] <- c("pseudlmtest", "pseudlmtest2")
testpts1.mesh <- file2mesh("C:/Users/katem/OneDrive/Documents/pseudlm/meshes/pseudlmtest.ply", clean = TRUE, readcol = FALSE)
testpts2.mesh <- file2mesh("C:/Users/katem/OneDrive/Documents/pseudlm/meshes/pseudlmtest2.ply", clean = TRUE, readcol = FALSE)
checkLM(testdata)
####writemeshtodisk####
mesh2ply(testpts1.mesh, filename="pseudlmtest")
mesh2ply(testpts2.mesh, filename="pseudlmtest2")
patchtest <- placePatch(pseudatlas, testdata, path = "C:/Users/katem/OneDrive/Documents/pseudlm/meshes", prefix = '', fileext=".ply", inflate=5)
RECEIVE ERROR PLEASE SEE ABOVE. THANKS
Dear Stefan,
I have an issue with the function computeTransform. When running this function, I get the following error:
Error in solve.default(L, m2) :
system is computationally singular: reciprocal condition number = 2.44159e-18
Strangely, this error only occurs in Linux or Mac, and not in windows. Is it possible that the tolerance for the solve function is different between these systems? In that case setting a fixed lower tolerance in the function could help.
Many thanks for any help!
Kind regards,
Steven
I'm using icpmat to register sets of points. Would it be possible to constrain the rotation with a parameter similar to mindist ? Could we also pass weights to icpmat ?
Hi there,
I'm interested in saving meshes to .obj format but need to have vertex normals written into the file. Is there some reason why mesh2obj
lacks this option while mesh2ply
has it? It looks like like a simple modification to add it to me. I don't know your policy on contributions but I could make a pull request to add this functionality if you'd like.
Interpretation of the plot could be easier if the connection of line color to pc is known. For example by calling palette(rainbow(length(pcshow))); palette(); palette("default"). But there might be an easier way to include this in the documentation.
When I am trying to run:
CVA(dataarray=PC.size.P4$x, groups=speciesID, weighting = T, plot = T, rounds = 100, cv = T, p.adjust.method = "none", robust = c("classical"))
I receive this error:
Error in if (rho > pi/2) CV[, i] <- -CV[, i] :
missing value where TRUE/FALSE needed
I know this is from the cv=T argument because when I change it to false, the code runs fine. I have use this same data array and groups classification in different combinations with no issues.
My email is [email protected] if you need more information about the code.
Hi,
first thanks for implementing between-group PCA in your package. I'm using it to classify fossil specimens in dietary categories based on the teeth shape of extant specimens.
I have all shapes (extant and fossils) superimposed in a gpagen object GPA.all
and a factor with the diet of extant species data_inf$DietCVA
. Then I use this code:
bgPCA <- groupPCA(GPA.all$coords[,,1:1101], groups= data_inf$DietCVA, cv=T)
class_bgpca <- classify(bgPCA, newdata= two.d.array(GPA.all$coords[,,1102:1222]), cv=T)
I obtain that all the specimens are insectivores, which is not possible because is the category less probable (also see figure: pink filled dots are fossil specimens plotted in the groupPCA space using predict()).
> class_bgpca
specimens have been classified as:
Insectivore
121
This does not change when I specify the prior probabilities. I don't know if it's my fault or a bug in the function. Maybe I'm using the wrong object for the newdata?
Thank you,
Iris
Is anyone else having issues with meshdist function on M1 Macs? I am thinking it maybe an openGL issue, but not sure how to solve.
Hi Stephan,
I wanted to recompile Morpho for R version 3.5.1 (2018-07-02), using a quite recent glib (2.28-4) in up-to-date arch Linux. I got the following error during install.packages:
[...]
installing to /[...]/R/x86_64-pc-linux-gnu-library/3.5/Morpho/libs
** R
** data
** inst
** byte-compile and prepare package for lazy loading
terminate called after throwing an instance of 'std::runtime_error'
what(): Mutex creation failed
/usr/lib64/R/bin/INSTALL: line 34: 2553 Done echo 'tools:::.install_packages()'
2554 Aborted (core dumped) | R_DEFAULT_PACKAGES= LC_COLLATE=C "${R_HOME}/bin/R" $myArgs --slave --args ${args}
Warning in install.packages :
installation of package ‘Morpho’ had non-zero exit status
If you can point me to some potential code locations, I can try to debug the issue myself.
Hi Stefan,
Thanks to your great package I've been able to use the function CVA() to perform Canonical Variate Analysis on a set of specimens to investigate how the shapes differ among groups. I've also performed Principle Component Analysis and phylogenetically corrected PCA on the same set of data for comparison (using functions from other R packages).
Because I am looking at shape variables across many closely related species, I am interested in correcting for the phylogenetic effect.
I am wondering if it's feasible to apply phylogenetic corrections on CVA? If so, were you planning to implement phylogenetically corrected CVA into your package in the future? Or are you aware of any other R package that is able to perform the said function?
Let me know if my question makes sense, I'm relatively new to geometric morphometric so am still trying to catch up with the knowledge base in the field.
Thanks in advance,
Zifang
Hi Stefan,
since the beginning of this week, I get an error message when I install Morpho from github.
In the end, it seems it was installed although I am not 100% sure it is the latest version: 2.9 is the one I have.
Thanks!
Cheers
Andrea
action()
:class
is absent but must be supplied.rlang::last_error()
to see where the error occurred.require(devtools)
install_github("zarquon42b/Morpho", local=FALSE)
Skipping install of 'Morpho' from a github remote, the SHA1 (9bf427d) has not changed since last install.
Useforce = TRUE
to force installation
Error inaction()
:
!class
is absent but must be supplied.
Runrlang::last_error()
to see where the error occurred.
rlang::last_error()
<error/rlang_error>
Error inaction()
:
!class
is absent but must be supplied.
Backtrace:
<fn>
()rlang::last_trace()
to see the full context.Re
Line 17 in 6078f91
I think this should really look something more like
#' @param ... additional arguments passed to methods
applyTransform <- function(x,trafo,...)UseMethod("applyTransform")
#' @rdname applyTransform
#' @export
applyTransform.matrix <- function(x,trafo,inverse=FALSE,threads=1, ...) {
Why? We are making calls like
Morpho::applyTransform(xyzmatrix(brain), symtransformation)
in a package that depends on Morpho and being told that there are missing arguments (inverse and threads).
Alternatively you could perhaps put the default values in the generic. Finally it is normally considered a good idea to include ...
in the generic to allow other methods to include additional arguments.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.