R/call-a-fortran.R

Defines functions call_a_fortran

Documented in call_a_fortran

#' R wrapper function calling a Fortran subroutine
#' 
#' @param x a numeric vector
#' @return double the elements of the numeric vector
#' @export
call_a_fortran = function(x) {
  x = as.numeric(x)
  n = as.integer(length(x))
  o = .Fortran("doubleit", n = n, x = x)
  return(o$x)
}
sakrejda/DoAFortran documentation built on April 17, 2020, 12:57 a.m.