2 min read

mf: an R package for ecologists and meteorologists - 写给生态学和气象学同行的 R 程序包

原文链接: steemit, cnsteem, busy, chainbb, steemdb, steemd, busy, markdown

This post was written bilingually, in English and Chinese.

本文用英文和中文写作,中文在后半部分。

Introduction

Days ago I posted a task request for contribution to the ‘mf’ package I have been developing with R language. Nobody has joined me yet. I guess I have to write an introduction to this package.

Several years ago I began learning R language in my doctoral research. I wrote and collected many equations in ecology and meteorology. For convenience I organized them in an .R script file and run source() to call these functions. Time passed and this script file grew bigger and bigger. Now there are around 50 functions in it. A single .R script is not easy to use any longer. Thus I developed the ‘mf’ package with all these functions in it.

Features

‘mf’ is mainly developed for college students and scientists. R beginners might be interested as well, because this package was written in simple R commands.

‘mf’ version 0.0.0 contains the equations which can:

  • convert trace gas concentration between different units,
  • convert air humidity between different units,
  • calculate the saturation pressure at a given temperature,
  • optimize the exponential model for trace gas flux estimation by chamber techniques,
  • plot a Taylor diagram to compare models and observations.

More functions are coming soon.

Quick Start

Installation of R

Download R and install it.

Installation of mf

In R environment, run the following codes to install pinyin.

devtools::install_github("pzhaonet/mf")

Examples

library(mf)
mf_convertRH()
mf_satpress(20)

https://github.com/pzhaonet/mf

Proof of Work

In my profile on Utopian.io, the github repo pinyin is listed in my project page, which is show in the screenshot as follows:

mf.jpg

The login page on github.com is shown in the following screenshot:

mf2.jpg


这是我写给生态学和气象学同行的一个简单的 R 程序包。

长久以来,有些朋友误以为我是个程序员,其实我不是。我的专业属于生态学-微气象学-大气科学。本文介绍的这个 R 程序包就是明证。

读博士期间,我积累了一些常用的公式,懒得每次都重新敲一遍,于是就写道同一个 R 脚本里,每次调用一下就行了。公式越来越多,脚本越来越不方便,后来索性弄成了个扩展包,安装和维护起来都方便。

mf 这个程序包,主要是给本专业的大学生和科研人员使用的。当然 R 语言初学者也可能感兴趣。目前,这个包的函数包含了

  • 痕量气体各种单位转换的公式,
  • 空气湿度各种单位转换的公式,
  • 饱和蒸气压的计算公式,
  • 箱式法测量痕量气体通量的指数模型优化方程,
  • 用于对比模型和参考值的泰勒图表的绘制函数等。

更有一大拨函数即将袭来。欢迎调戏。



Posted on Utopian.io - Rewarding Open Source Contributors