Before work inside the library funcy (especially the function funcit), I loaded the following packages: flexclust, fda, wavethresh, kernlab, modeltools, car, carData, fields, calibrate, sm, MASS.
At the end I loaded the package funcy.
I try to run the example (find inside the help):
After the last script, appear this error message: "Error in command 'create.bspline.irregular(c(time[1], time[m]), nbasis = nbasis, ': failed to find function 'create.bspline.irregular' ". I check this function and it is inside the fda package (and it was installed).
I do not undesratnd were is the mistake. I try the other examples and all give me the same error.
I am not sure as I do not have funcy or most of the rest of those packages installed but before anything else try shutting down RStudio and R and restart.
You comment is not constructive as you provide no actionable feedback... but regardless this issue is almost certainly because this ecosystem of packages is perhaps not actively maintained and seem somewhat disordered. I was able to find a particular combination of the core packages that seemed to 'work'.
I would strongly advise you not to do any significant work with these tools without also using a combination of renv and git tracking, to record and document the library dependencies should you want to revisit work down the road.
#setup
library(renv)
install("funcy@1.0.0") # 1.0.1 was removed from CRAN
install("Funclustering@1.0.2")
install("fda@2.4.8")
#test
library(funcy)
library(fda)
library(Funclustering)
set.seed(2804)
ds <- sampleFuncy(obsNr=50, k=4, timeNr=8, reg=TRUE)
##Cluster the functions with all available methods.
res <- funcit(data=Data(ds), clusters=Cluster(ds),
methods=c(1,2,3,4), seed=2404,
k=4)