Using Codex I wrote a partial transpiler from R to Fortran. Please submit R codes for which it fails.
6 Likes
The previous version of the transpiler converted R syntax for loops, conditionals, array access, and functions etc. to Fortran, but R also has a lot of built-in statistical and linear algebra algorithms, which are now in a module, documented here, that the transpiler or stand-alone Fortran programs can use. There are procedures for
- Printing Arrays
- Vectors, Sequences, and Repetition
- Matrices and Array Semantics
- Set, Match, and Index Helpers
- Random Numbers and Sampling for Many Distributions
- Probability and Special Functions
- Summary Statistics and Linear Algebra
- Data Frames, Tables, and Grouped Operations
- Model and Test Result Types (the result of a statistical analysis is returned in a derived type)
- Optimization and Integration
- Smoothers and Time-Series Analysis
- Clustering
- Dates, Files, and Strings
4 Likes