Switching from Matlab to R

Total Page:16

File Type:pdf, Size:1020Kb

Switching from Matlab to R Appendix A Switching from Matlab to R Most analysts find that it is not difficult to switch from Matlab to R, especially if a few key differences are kept in mind. This appendix provides a list of such differences, gleaned from the experience of the author and his colleagues (especially Clark Richards, who helped to compile the list). Syntax 1. Assignment to a variable is denoted with “=” in Matlab, but with “<-”inR. (Actually, it is possible to use “=” for R assignment, but not recommended.) 2. In R, assignment statements do not print their value, so there is no need for the Matlab convention of using “;” for silencing an assignment. 3. In R, as in most modern languages except Matlab, square brackets are used for indexing; see Sect. 2.3.4. 4. R matrices are not constructed with a square-bracket syntax, but rather with matrix(), as.matrix(), cbind() or rbind(); see Sect. 2.3.5. 5. In Matlab, vectors (one-dimensional sequences of values) are often represented as single-column matrices. The same form can be used in R, but most functions work with vectors, instead. The drop() function, which drops unused matrix dimensions, helps to convert Matlab data to R format, e.g. the following shows how to create vectors for regression with lm(). library(R.matlab) m <- readMat("filename.mat") x <- drop(m$x) y <- drop(m$y) lm(y ~ x) 6. R coerces arrays to a lower dimension whenever it can (Sect. 2.3.5.2), but the drop=FALSE argument can override this, e.g. © Springer Science+Business Media, LLC, part of Springer Nature 2018 241 D. E. Kelley, Oceanographic Analysis with R, https://doi.org/10.1007/978-1-4939-8844-0 242 Appendix A Switching from Matlab to R a <- matrix(1:10, nrow=2) a[1,] # a vector [1]13579 yields a vector, whereas a[1,,drop=FALSE] # a 1-row matrix [,1] [,2] [,3] [,4] [,5] [1,]13579 yields a one-row matrix. (Note the second comma in the drop=FALSE case.) 7. Matrix multiplication in R uses the %*% operator, while the * operator does item- by-item multiplication. See Sect. 2.3.5.1 for this and other matrix operations. 8. In Matlab, a period in a variable name indicates the selection of a subcomponent of a structure. In R, a period in a variable name is generally taken to have no particular meaning except for generalized functions. See Sect. 2.3.2. 9. The q() function is called to exit R. Since this is a function call, the parentheses are required. Dropping the parentheses yields a cryptic message that does little to suggest that R is a friendly language! Graphics 1. In Matlab, hold on is used to indicate a desire to embellish an existing plot. Instead, R provides a suite of functions whose whole purpose is to add to existing plots, such as points() for adding points, lines() for adding lines, title() for adding titles, legend() for adding legends, mtext() for writing in plot margins, etc., plus an add argument to contour() and a few other functions to make them add to an existing plot; see Sect. 2.4. 2. Matlab offers better interactive control of plots than is available in the basic R graphics system, although the shiny package makes up for this, at some coding cost. See Sects. 2.4.15 and 2.8, plus Appendix B. 3. Matlab produces “flashier” default graphics, e.g. automatically using colours to distinguish between lines on a plot. The R strategy is to produce more utilitarian black/white default plots, in accordance with the tenets outlined by Cleveland and McGill (1984) and others who have studied the interpretation of graphical material. R also offers colour schemes that are suitable for viewers with vision limitations (Ihaka 2003; Light and Bartlein 2004; Zeileis et al. 2009). Freedom 1. Matlab is a commercial product, sold at a price that is significant to many research groups and is likely to be prohibitive to those “citizen scientists” who might wish to use code provided in the supplemental materials of research papers. R costs nothing. Appendix A Switching from Matlab to R 243 2. Portions of Matlab are in closed-source form, making it difficult for users to check the methods for veracity or appropriateness. The entire R source is open to inspection. 3. Matlab is covered by commercial licences that may be untoward in some circumstances. R is covered by a GNU license. Appendix B GUI Systems for R Graphical user interfaces (GUIs) simplify the interactive use of R, providing benefits to users of various skill levels. Those with limited programming experience may find GUIs less daunting than the R command-line interface. Those will more programming experience may appreciate the ease with which GUIs let them access previous commands, plots, and documentation views. Even experts may use GUIs when they need simple access to debugging tools, without losing the ability to use the editors and revision-control systems of their choice. The basic R system centres on a command-line mode, but this is supplemented by various GUI systems that can ease interactive analysis (Fig. B.1). Many users switch between GUI and the command-line, for different sorts of tasks or for a given task at different stages of completion.1 Some R newcomers, especially those with limited programming experience, focus almost entirely on GUI systems, but even experienced programmers can benefit from GUIs for occasional or everyday use. There are several GUIs to choose from. Most are in continuous development, making it problematic to provide detailed feature comparisons here. Still, a broad and quite personal overview may be of some use to readers. • Rstudio is a multi-platform system that is popular across a wide range of R users. Beginners appreciate the access it provides to previously viewed docu- mentation entries and plots, along with its provision of a simple data viewer and a code-aware text editor. Those with more computing skills will appreciate that Rstudio works well with system tools, such as external editors and revision control systems. Developers will appreciate the ease of rebuilding packages, 1For example, the author tends to use Rstudio to build packages, but not for data analysis. For the latter, he uses Mac-GUI (usually coupled with a Vim editor window) for exploratory work, moving to standalone script files as the work progresses. For any task that takes more than a minute, these script files are run with a Makefile so that analysis is repeated only when the R source-code or the data files are changed. © Springer Science+Business Media, LLC, part of Springer Nature 2018 245 D. E. Kelley, Oceanographic Analysis with R, https://doi.org/10.1007/978-1-4939-8844-0 246 Appendix B GUI Systems for R Fig. B.1 An Rstudio window, configured with panels for source code, documentation, console and graphics interacting with the debugger, running code-quality checkers, etc. Users at all levels can benefit from Rstudio notebooks, which record interactive work in webpages that combine code and graphs. • Mac-GUI is a Macintosh-only system that provides menu access to documenta- tion, graphs, console, and editor windows. It provides several Rstudio features, although typically in more limited ways. Its restriction to a single platform is a limitation for users who switch between different types of computer. Mac-GUI does not follow the Rstudio tendency of merging windows together into a single frame, so it can be a good choice for those who prefer to size and arrange their own windows. • JGR supports some of the features of Rstudio, in a more limited way. • Rcommander provides menu items for some operations such as data loading, regression and plotting, which may be appealing to beginners. In addition to GUI systems, there are connections between R and several of the general text editors that are popular in technical fields. This is important because users with programming experience tend to have a favourite code-aware text editor with which they are particularly adept. Emacs users can run R with the ESS (Emacs Speaks Statistics) system, while Vim users can use the Vim-R-plugin system. Both of these are set up for R syntax so they can indent and colourize appropriately, and both interact with R to let users execute blocks of code, consult documentation, and perform other tasks involved in using R. Appendix C Map Projections in oce The oce package provides many of the map projections used in modern cartog- raphy. The calculations are done with the rgdal package as an interface to the underlying PROJ.4 system, and this means that the notation will be familiar to readers who have experience with map projections in other computing languages. Only projections that may be inverted are incorporated in oce, because inverse calculations are required for labelling axes, etc. A table of the roughly 100 oce projections is presented in this appendix, along with general remarks on choosing projections and the details of a few common projections. Cartesian latitude-longitude plots may be suitable for limited areas, if meridional convergence is handled by setting asp to the reciprocal cosine of mean latitude. However, a projection may be preferable for scales exceeding a few hundred kilometres. There are many projections to choose from, and no firm rules to guide the selection. Often, a projection is chosen to match previous work, facilitating visual comparison of the data being displayed. The distortion of shapes and areas are also important considerations (see Airy (1861) for an early treatment and modern discussions by Snyder (1987) and Evenden (2003), the last of which employs the PROJ.4 notation used in oce).
Recommended publications
  • Sagemath and Sagemathcloud
    Viviane Pons Ma^ıtrede conf´erence,Universit´eParis-Sud Orsay [email protected] { @PyViv SageMath and SageMathCloud Introduction SageMath SageMath is a free open source mathematics software I Created in 2005 by William Stein. I http://www.sagemath.org/ I Mission: Creating a viable free open source alternative to Magma, Maple, Mathematica and Matlab. Viviane Pons (U-PSud) SageMath and SageMathCloud October 19, 2016 2 / 7 SageMath Source and language I the main language of Sage is python (but there are many other source languages: cython, C, C++, fortran) I the source is distributed under the GPL licence. Viviane Pons (U-PSud) SageMath and SageMathCloud October 19, 2016 3 / 7 SageMath Sage and libraries One of the original purpose of Sage was to put together the many existent open source mathematics software programs: Atlas, GAP, GMP, Linbox, Maxima, MPFR, PARI/GP, NetworkX, NTL, Numpy/Scipy, Singular, Symmetrica,... Sage is all-inclusive: it installs all those libraries and gives you a common python-based interface to work on them. On top of it is the python / cython Sage library it-self. Viviane Pons (U-PSud) SageMath and SageMathCloud October 19, 2016 4 / 7 SageMath Sage and libraries I You can use a library explicitly: sage: n = gap(20062006) sage: type(n) <c l a s s 'sage. interfaces .gap.GapElement'> sage: n.Factors() [ 2, 17, 59, 73, 137 ] I But also, many of Sage computation are done through those libraries without necessarily telling you: sage: G = PermutationGroup([[(1,2,3),(4,5)],[(3,4)]]) sage : G . g a p () Group( [ (3,4), (1,2,3)(4,5) ] ) Viviane Pons (U-PSud) SageMath and SageMathCloud October 19, 2016 5 / 7 SageMath Development model Development model I Sage is developed by researchers for researchers: the original philosophy is to develop what you need for your research and share it with the community.
    [Show full text]
  • Introduction to IDL®
    Introduction to IDL® Revised for Print March, 2016 ©2016 Exelis Visual Information Solutions, Inc., a subsidiary of Harris Corporation. All rights reserved. ENVI and IDL are registered trademarks of Harris Corporation. All other marks are the property of their respective owners. This document is not subject to the controls of the International Traffic in Arms Regulations (ITAR) or the Export Administration Regulations (EAR). Contents 1 Introduction To IDL 5 1.1 Introduction . .5 1.1.1 What is ENVI? . .5 1.1.2 ENVI + IDL, ENVI, and IDL . .6 1.1.3 ENVI Resources . .6 1.1.4 Contacting Harris Geospatial Solutions . .6 1.1.5 Tutorials . .6 1.1.6 Training . .7 1.1.7 ENVI Support . .7 1.1.8 Contacting Technical Support . .7 1.1.9 Website . .7 1.1.10 IDL Newsgroup . .7 2 About This Course 9 2.1 Manual Organization . .9 2.1.1 Programming Style . .9 2.2 The Course Files . 11 2.2.1 Installing the Course Files . 11 2.3 Starting IDL . 11 2.3.1 Windows . 11 2.3.2 Max OS X . 11 2.3.3 Linux . 12 3 A Tour of IDL 13 3.1 Overview . 13 3.2 Scalars and Arrays . 13 3.3 Reading Data from Files . 15 3.4 Line Plots . 15 3.5 Surface Plots . 17 3.6 Contour Plots . 18 3.7 Displaying Images . 19 3.8 Exercises . 21 3.9 References . 21 4 IDL Basics 23 4.1 IDL Directory Structure . 23 4.2 The IDL Workbench . 24 4.3 Exploring the IDL Workbench .
    [Show full text]
  • A Comparative Evaluation of Matlab, Octave, R, and Julia on Maya 1 Introduction
    A Comparative Evaluation of Matlab, Octave, R, and Julia on Maya Sai K. Popuri and Matthias K. Gobbert* Department of Mathematics and Statistics, University of Maryland, Baltimore County *Corresponding author: [email protected], www.umbc.edu/~gobbert Technical Report HPCF{2017{3, hpcf.umbc.edu > Publications Abstract Matlab is the most popular commercial package for numerical computations in mathematics, statistics, the sciences, engineering, and other fields. Octave is a freely available software used for numerical computing. R is a popular open source freely available software often used for statistical analysis and computing. Julia is a recent open source freely available high-level programming language with a sophisticated com- piler for high-performance numerical and statistical computing. They are all available to download on the Linux, Windows, and Mac OS X operating systems. We investigate whether the three freely available software are viable alternatives to Matlab for uses in research and teaching. We compare the results on part of the equipment of the cluster maya in the UMBC High Performance Computing Facility. The equipment has 72 nodes, each with two Intel E5-2650v2 Ivy Bridge (2.6 GHz, 20 MB cache) proces- sors with 8 cores per CPU, for a total of 16 cores per node. All nodes have 64 GB of main memory and are connected by a quad-data rate InfiniBand interconnect. The tests focused on usability lead us to conclude that Octave is the most compatible with Matlab, since it uses the same syntax and has the native capability of running m-files. R was hampered by somewhat different syntax or function names and some missing functions.
    [Show full text]
  • A Fast Dynamic Language for Technical Computing
    Julia A Fast Dynamic Language for Technical Computing Created by: Jeff Bezanson, Stefan Karpinski, Viral B. Shah & Alan Edelman A Fractured Community Technical work gets done in many different languages ‣ C, C++, R, Matlab, Python, Java, Perl, Fortran, ... Different optimal choices for different tasks ‣ statistics ➞ R ‣ linear algebra ➞ Matlab ‣ string processing ➞ Perl ‣ general programming ➞ Python, Java ‣ performance, control ➞ C, C++, Fortran Larger projects commonly use a mixture of 2, 3, 4, ... One Language We are not trying to replace any of these ‣ C, C++, R, Matlab, Python, Java, Perl, Fortran, ... What we are trying to do: ‣ allow developing complete technical projects in a single language without sacrificing productivity or performance This does not mean not using components in other languages! ‣ Julia uses C, C++ and Fortran libraries extensively “Because We Are Greedy.” “We want a language that’s open source, with a liberal license. We want the speed of C with the dynamism of Ruby. We want a language that’s homoiconic, with true macros like Lisp, but with obvious, familiar mathematical notation like Matlab. We want something as usable for general programming as Python, as easy for statistics as R, as natural for string processing as Perl, as powerful for linear algebra as Matlab, as good at gluing programs together as the shell. Something that is dirt simple to learn, yet keeps the most serious hackers happy.” Collapsing Dichotomies Many of these are just a matter of design and focus ‣ stats vs. linear algebra vs. strings vs.
    [Show full text]
  • Map Projections--A Working Manual
    This is a reproduction of a library book that was digitized by Google as part of an ongoing effort to preserve the information in books and make it universally accessible. https://books.google.com 7 I- , t 7 < ?1 > I Map Projections — A Working Manual By JOHN P. SNYDER U.S. GEOLOGICAL SURVEY PROFESSIONAL PAPER 1395 _ i UNITED STATES GOVERNMENT PRINTING OFFIGE, WASHINGTON: 1987 no U.S. DEPARTMENT OF THE INTERIOR BRUCE BABBITT, Secretary U.S. GEOLOGICAL SURVEY Gordon P. Eaton, Director First printing 1987 Second printing 1989 Third printing 1994 Library of Congress Cataloging in Publication Data Snyder, John Parr, 1926— Map projections — a working manual. (U.S. Geological Survey professional paper ; 1395) Bibliography: p. Supt. of Docs. No.: I 19.16:1395 1. Map-projection — Handbooks, manuals, etc. I. Title. II. Series: Geological Survey professional paper : 1395. GA110.S577 1987 526.8 87-600250 For sale by the Superintendent of Documents, U.S. Government Printing Office Washington, DC 20402 PREFACE This publication is a major revision of USGS Bulletin 1532, which is titled Map Projections Used by the U.S. Geological Survey. Although several portions are essentially unchanged except for corrections and clarification, there is consider able revision in the early general discussion, and the scope of the book, originally limited to map projections used by the U.S. Geological Survey, now extends to include several other popular or useful projections. These and dozens of other projections are described with less detail in the forthcoming USGS publication An Album of Map Projections. As before, this study of map projections is intended to be useful to both the reader interested in the philosophy or history of the projections and the reader desiring the mathematics.
    [Show full text]
  • Dynamics for ML Using Meta-Programming
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by Elsevier - Publisher Connector Electronic Notes in Theoretical Computer Science 264 (5) (2011) 3–21 www.elsevier.com/locate/entcs Dynamics for ML using Meta-Programming Thomas Gazagnaire INRIA Sophia Antipolis-M´editerran´ee, 2004 Route des Lucioles, BP 93, 06902 Sophia Antipolis Cedex, France [email protected] Anil Madhavapeddy Computer Laboratory, 15 JJ Thomson Avenue, Cambridge CB3 0FD, UK [email protected] Abstract We present the design and implementation of dynamic type and value introspection for the OCaml language. Unlike previous attempts, we do not modify the core compiler or type-checker, and instead use the camlp4 metaprogramming tool to generate appropriate definitions at compilation time. Our dynamics library significantly eases the task of generating generic persistence and I/O functions in OCaml programs, without requiring the full complexity of fully-staged systems such as MetaOCaml. As a motivating use of the library, we describe a SQL backend which generates type-safe functions to persist and retrieve values from a relational database, without requiring programmers to ever use SQL directly. Keywords: ocaml, metaprogramming, generative, database, sql, dynamics 1 Introduction One of the great advantages of programming languages inheriting the Hindley- Milner type system [6,17]suchasOCaml[12] or Haskell [11] is the conciseness and expressiveness of their type language. For example, sum types in these languages are very natural to express and use when coupled with pattern-matching. These concepts can be translated to C or Java, but at the price of a costly and unnatural encoding.
    [Show full text]
  • Instructions for Creating Your Own R Package∗
    Instructions for Creating Your Own R Package∗ In Song Kimy Phil Martinz Nina McMurryx Andy Halterman{ March 18, 2018 1 Introduction The following is a step-by-step guide to creating your own R package. Even beyond this course, you may find this useful for storing functions you create for your own research or for editing existing R packages to suit your needs. This guide contains three different sets of instructions. If you use RStudio, you can follow the \Ba- sic Instructions" in Section 2 which involve using RStudio's interface. If you do not use RStudio or you do use RStudio but want a little bit more of control, follow the instructions in Section 3. Section 4 illustrates how to create a R package with functions written in C++ via Rcpp helper functions. NOTE: Write all of your functions first (in R or RStudio) and make sure they work properly before you start compiling your package. You may also want to try compiling with a very simple function first (e.g. myfun <- function(x)fx + 7g). 2 Basic Instructions (for RStudio Users Only) All of the following should be done in RStudio, unless otherwise noted. Even if you build your package in RStudio using the \Basic Instructions," we strongly recommend that you carefully review the \Advanced Instructions" as well. RStudio has built-in tools that will do many of these steps for you, but knowing how to do them manually will make it easier for you to build and distribute your own packages in the future and/or adapt existing packages.
    [Show full text]
  • Rstudio Connect: Admin Guide Version 1.5.12-7
    RStudio Connect: Admin Guide Version 1.5.12-7 Abstract This guide will help an administrator install and configure RStudio Connect on a managed server. You will learn how to install the product on different operating systems, configure authentication, and monitor system resources. Contents 1 Introduction 4 1.1 System Requirements . .4 2 Getting Started 5 2.1 Installation . .5 2.2 Initial Configuration . .7 3 License Management 9 3.1 Capabilities . .9 3.2 Notification of Expiration . .9 3.3 Product Activation . .9 3.4 Connectivity Requirements . 10 3.5 Evaluations . 11 3.6 Licensing Errors . 12 3.7 Floating Licensing . 12 4 Files & Directories 15 4.1 Program Files . 15 4.2 Configuration . 15 4.3 Server Log . 15 4.4 Access Logs . 16 4.5 Application Logs . 16 4.6 Variable Data . 16 4.7 Backups . 18 4.8 Server Migrations . 18 5 Server Management 19 5.1 Stopping and Starting . 19 5.2 System Messages . 21 5.3 Health-Check . 21 5.4 Upgrading . 21 5.5 Purging RStudio Connect . 22 6 High Availability and Load Balancing 22 6.1 HA Checklist . 22 6.2 HA Limitations . 23 6.3 Updating HA Nodes . 24 6.4 Downgrading . 24 6.5 HA Details . 24 1 7 Running with a Proxy 25 7.1 Nginx Configuration . 26 7.2 Apache Configuration . 27 8 Security & Auditing 28 8.1 API Security . 28 8.2 Browser Security . 28 8.3 Audit Logs . 30 8.4 Audit Logs Command-Line Interface . 31 9 Database 31 9.1 SQLite . 31 9.2 PostgreSQL .
    [Show full text]
  • Introduction to Sqlite and Its Usage with Python 1. Sqlite : Sqlite Is A
    SQLite Dhananjay(123059008) Introduction to Sqlite and its usage with python 1. Sqlite : SQLite is a software library that implements a self-contained, serverless, zero- configuration, transactional SQL database engine. SQLite is the most widely deployedSQL database engine in the world. SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. To install : $ sudo apt-get install sqlite3 libsqlite3-dev To create a data base, we only need to create a empty file : $ touch ex1.db To connect to database through sqlite : $ sqlite3 ex1.db There are various shells and command lines available for manipulating Sqlite databases. 2. SQLite Database browser It is a light GUI editor for SQLite databases. It can be used as a basic database management system. 3. Using python library sqlite for manipulating databases : SQLite is a C library that provides a lightweight disk-based database that doesn’t require a separate server process and allows accessing the database using a nonstandard variant of the SQL query language. Some applications can use SQLite for internal data storage. It’s also possible to prototype an application using SQLite and then port the code to a larger database such as PostgreSQL or Oracle. SQLite Dhananjay(123059008) import sqlite3 conn = sqlite3.connect('example.db') c = conn.cursor() c.execute('''CREATE TABLE stocks (date text, trans text, symbol text, qty real, price real)''') c.execute("INSERT INTO stocks VALUES ('2006-01- 05','BUY','RHAT',100,35.14)") conn.commit() conn.close() Above script is a simple demo of ‘how to connect to a Sqlute db using puthon’.
    [Show full text]
  • Introduction to Ggplot2
    Introduction to ggplot2 Dawn Koffman Office of Population Research Princeton University January 2014 1 Part 1: Concepts and Terminology 2 R Package: ggplot2 Used to produce statistical graphics, author = Hadley Wickham "attempt to take the good things about base and lattice graphics and improve on them with a strong, underlying model " based on The Grammar of Graphics by Leland Wilkinson, 2005 "... describes the meaning of what we do when we construct statistical graphics ... More than a taxonomy ... Computational system based on the underlying mathematics of representing statistical functions of data." - does not limit developer to a set of pre-specified graphics adds some concepts to grammar which allow it to work well with R 3 qplot() ggplot2 provides two ways to produce plot objects: qplot() # quick plot – not covered in this workshop uses some concepts of The Grammar of Graphics, but doesn’t provide full capability and designed to be very similar to plot() and simple to use may make it easy to produce basic graphs but may delay understanding philosophy of ggplot2 ggplot() # grammar of graphics plot – focus of this workshop provides fuller implementation of The Grammar of Graphics may have steeper learning curve but allows much more flexibility when building graphs 4 Grammar Defines Components of Graphics data: in ggplot2, data must be stored as an R data frame coordinate system: describes 2-D space that data is projected onto - for example, Cartesian coordinates, polar coordinates, map projections, ... geoms: describe type of geometric objects that represent data - for example, points, lines, polygons, ... aesthetics: describe visual characteristics that represent data - for example, position, size, color, shape, transparency, fill scales: for each aesthetic, describe how visual characteristic is converted to display values - for example, log scales, color scales, size scales, shape scales, ..
    [Show full text]
  • Introduction to GNU Octave
    Introduction to GNU Octave Hubert Selhofer, revised by Marcel Oliver updated to current Octave version by Thomas L. Scofield 2008/08/16 line 1 1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 8 6 4 2 -8 -6 0 -4 -2 -2 0 -4 2 4 -6 6 8 -8 Contents 1 Basics 2 1.1 What is Octave? ........................... 2 1.2 Help! . 2 1.3 Input conventions . 3 1.4 Variables and standard operations . 3 2 Vector and matrix operations 4 2.1 Vectors . 4 2.2 Matrices . 4 1 2.3 Basic matrix arithmetic . 5 2.4 Element-wise operations . 5 2.5 Indexing and slicing . 6 2.6 Solving linear systems of equations . 7 2.7 Inverses, decompositions, eigenvalues . 7 2.8 Testing for zero elements . 8 3 Control structures 8 3.1 Functions . 8 3.2 Global variables . 9 3.3 Loops . 9 3.4 Branching . 9 3.5 Functions of functions . 10 3.6 Efficiency considerations . 10 3.7 Input and output . 11 4 Graphics 11 4.1 2D graphics . 11 4.2 3D graphics: . 12 4.3 Commands for 2D and 3D graphics . 13 5 Exercises 13 5.1 Linear algebra . 13 5.2 Timing . 14 5.3 Stability functions of BDF-integrators . 14 5.4 3D plot . 15 5.5 Hilbert matrix . 15 5.6 Least square fit of a straight line . 16 5.7 Trapezoidal rule . 16 1 Basics 1.1 What is Octave? Octave is an interactive programming language specifically suited for vectoriz- able numerical calculations.
    [Show full text]
  • Regression Models by Gretl and R Statistical Packages for Data Analysis in Marine Geology Polina Lemenkova
    Regression Models by Gretl and R Statistical Packages for Data Analysis in Marine Geology Polina Lemenkova To cite this version: Polina Lemenkova. Regression Models by Gretl and R Statistical Packages for Data Analysis in Marine Geology. International Journal of Environmental Trends (IJENT), 2019, 3 (1), pp.39 - 59. hal-02163671 HAL Id: hal-02163671 https://hal.archives-ouvertes.fr/hal-02163671 Submitted on 3 Jul 2019 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Distributed under a Creative Commons Attribution| 4.0 International License International Journal of Environmental Trends (IJENT) 2019: 3 (1),39-59 ISSN: 2602-4160 Research Article REGRESSION MODELS BY GRETL AND R STATISTICAL PACKAGES FOR DATA ANALYSIS IN MARINE GEOLOGY Polina Lemenkova 1* 1 ORCID ID number: 0000-0002-5759-1089. Ocean University of China, College of Marine Geo-sciences. 238 Songling Rd., 266100, Qingdao, Shandong, P. R. C. Tel.: +86-1768-554-1605. Abstract Received 3 May 2018 Gretl and R statistical libraries enables to perform data analysis using various algorithms, modules and functions. The case study of this research consists in geospatial analysis of Accepted the Mariana Trench, a hadal trench located in the Pacific Ocean.
    [Show full text]