Skip to content

Commit 314e5ea

Browse files
authored
Add r-rtsne (#5640)
* Add r-rtsne * Fix r-rtsne: add libflang to host, add license_file, improve test * fix ci
1 parent 2488a0b commit 314e5ea

2 files changed

Lines changed: 61 additions & 0 deletions

File tree

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
context:
2+
name: r-rtsne
3+
version: "0.17"
4+
ccname: Rtsne
5+
6+
package:
7+
name: ${{ name }}
8+
version: ${{ version }}
9+
10+
source:
11+
url:
12+
- https://cran.r-project.org/src/contrib/${{ ccname }}_${{ version }}.tar.gz
13+
- https://cloud.r-project.org/src/contrib/${{ ccname }}_${{ version }}.tar.gz
14+
sha256: 3aae6814d6c6d406785145f07374135652f2b26a58690dfd4bfbc8365dc5590b
15+
16+
build:
17+
number: 0
18+
script: $R CMD INSTALL $R_ARGS .
19+
skip: ${{ r_base == '4.6.0' }}
20+
21+
requirements:
22+
build:
23+
- cross-r-base_${{ target_platform }} ==${{ r_base }}
24+
- ${{ compiler('c') }}
25+
- ${{ compiler('cxx') }}
26+
- r-rcpp
27+
host:
28+
- libflang
29+
- r-base ==${{ r_base }}
30+
- r-rcpp
31+
run:
32+
- r-rcpp
33+
34+
tests:
35+
- package_contents:
36+
lib:
37+
- R/library/${{ ccname }}/libs/${{ ccname }}.so
38+
- script: run_r_test test_rtsne.R
39+
files:
40+
recipe:
41+
- test_rtsne.R
42+
requirements:
43+
build:
44+
- r-wasm-tester
45+
46+
about:
47+
homepage: https://cran.r-project.org/package=Rtsne
48+
repository: https://github.com/jkrijthe/Rtsne
49+
license: LicenseRef-FOSS
50+
license_file: LICENSE
51+
summary: T-Distributed Stochastic Neighbor Embedding using Barnes-Hut Implementation
52+
53+
extra:
54+
recipe-maintainers:
55+
- anutosh491
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
library(Rtsne)
2+
3+
set.seed(42)
4+
X <- matrix(rnorm(50 * 5), 50, 5)
5+
result <- Rtsne(X, dims = 2, perplexity = 5, verbose = FALSE)
6+
stopifnot(nrow(result$Y) == 50, ncol(result$Y) == 2)

0 commit comments

Comments
 (0)