[R] Need some help with converting MATLAB .m script to R
ashwinD12 .
winash12 at gmail.com
Wed Jun 24 18:49:24 CEST 2015
Hello,
I have few scripts that have been written in MATLAB. I need to
translate or convert them into R. They all deal with reading in a netcdf
file and doing some plots. I managed to read in the netcdf file with these
API calls
# Read input file
input_dir = "/home/aan/aa/data/r"
file = "RRR"
input_file = file.path(input_dir,file)
library(ncdf4)
Upto this everything works. Here is the MATLAB code for which I need help
% Plot continental boundaries (rotated latitude/longitude)
figure;
inp.COAST_RLON.data ( inp.COAST_RLON.data< -900 ) = NaN;
inp.COAST_RLAT.data ( inp.COAST_RLAT.data< -900 ) = NaN;
plot(inp.COAST_RLON.data,inp.COAST_RLAT.data,'k');
Regards,
Ashwin.
[[alternative HTML version deleted]]
More information about the R-help
mailing list