Skip to content

Commit 1063fc9

Browse files
committed
feat: add R support
1 parent 0ffb18f commit 1063fc9

3 files changed

Lines changed: 14 additions & 0 deletions

File tree

.babelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"kotlin",
1414
"perl",
1515
"python",
16+
"r",
1617
"ruby",
1718
"rust",
1819
"swift",

languages/lang.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Programming Languages:
77
- kotlin Kotlin
88
- perl Perl
99
- python Python
10+
- r R
1011
- ruby Ruby
1112
- rust Rust
1213
- swift Swift

languages/samples/r.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Generate a sequence of numbers from 0 to 2*pi
2+
x <- seq(0, 2*pi, length.out = 100)
3+
4+
# Compute the sine of each number
5+
y <- sin(x)
6+
7+
# Plot the sine wave
8+
plot(x, y, type = "l", col = "blue", lwd = 2,
9+
main = "Sine Wave", xlab = "x", ylab = "sin(x)")
10+
11+
# Add grid lines for better visualization
12+
grid()

0 commit comments

Comments
 (0)