R Under development (unstable) (2023-11-08 r85496 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > ## > ## l i n s p a c e . R > ## > > linspace <- pracma::linspace > logspace <- pracma::logspace > logseq <- pracma::logseq > > identical(linspace(1, 100), as.numeric(1:100)) [1] TRUE > identical(linspace(0, 25, 5), c(0, 6.25, 12.50, 18.75, 25)) [1] TRUE > identical(linspace(1, 25, 1.5), 25) [1] TRUE > identical(all.equal(logspace(1, pi, n=5), + c(10.0000, 7.4866, 5.6050, 4.1963, 3.1416), + tolerance=0.0001), + TRUE) [1] TRUE > all.equal(logseq(1, 100, 3), c(1, 10, 100)) [1] TRUE > > proc.time() user system elapsed 0.15 0.06 0.15