Brief Intro and curriculum ‘rosr’ is an R package for creating reproducible academic project with integrated various academic elements, including data, bibliography, codes, images, manuscripts, dissertations, slides and so on. These elements are well connected so that they can be easily synchronized and updated. Users don’t have to repeat copying and pasting their results and figures from time to time. It will be easy for the scientific researchers to use, even if they are R beginners, or even non-R-users.


What is the project about? Weeks ago, I gave a short training course at one of the top institutes in the world. The course was called ‘R, Open Science and Reproducible Research’, abbreviated as ROSS. It was given to the academic researchers who were interested in R and reproducible research. The R markdown family, including ‘rticles’, ‘bookdown’, ‘xaringan’ etc., were introduced. The audience were excited in the course. They felt, however, confused after the course by using these packages on their own work.


Most R beginners think that developing an R package is a mission impossible. It is not true. With the new function packr() , users can create a user-defined useful R packages easily. They can specify in packr()a group of packages (e.g. foo_1, foo_2, foo_x) which they often use and the new package name, say foobar, then a new package called foobar will be generated. When loading the foobar function, the package group, i.


The new version 1.2.0 mainly brings four exciting features. Suggested by @yihui, an argument of ‘method’ was added to each main functions. Users can choose the method of regular expression or pandoc to pick out the outline of a markdown file. Suggested by the issue from the users, now mindr can save the mind map as an HTML widget file and share the mind map on web. A new function tree() can create a mind map from a directory on your computer.


Introduction Since ‘rmarkdown’ and ‘knitr’, more and more members (rticles, bookdown, mindr…) have been joining the R Markdown family. Users can write elegant reproducible documents, manuscripts, dissertations, books, blog posts, posters, and slides within the framework of R markdown. It is exciting, while the installation and maintenance becomes annoying. In the meanwhile, there are plenty of useful RStudio addins, which equip the RStudio IDE as a powerful markdown editor. However, these little tools are often hidden somewhere deep in the community, and it is difficult to dig them out.


New Features Commit: convertion between .Rmd, .R. and .mm The new version 1.1.8 mainly brings two exciting features. yihui suggested that comments .R scripts can be written in a predefined strategy, which is very friendly. I improved this strategy with some modification, and added a new pair of functions, i.e. mindr::r2rmd() and mind::rmd2r(), which convert a file between .R script and .Rmd document smoothly. An example .R script is given here.



More Publications

  • Castelli, M.; Anderson, M.; Yang, Y.; Wohlfahrt, G.; Bertoldi, G.; Niedrist, G.; Hammerle, A.; Zhao, P.; Zebisch, M. & Notarnicola, C. Two-source energy balance modeling of evapotranspiration in Alpine grasslands Remote Sensing of Environment , 2018, 209, 327 - 342.

    Details PDF Link

  • Zhao, P., Hammerle, A., Zeeman, M., & Wohlfahrt, G. (2018). On the calculation of daytime CO2 fluxes measured by automated closed transparent chambers. Agricultural and Forest Meteorology, 263, 267–275.

    Details PDF Link

  • Zhao, P., and Lüers J.. 2017. Parameterization of Evapotranspiration Estimation for Two Typical East Asian Crops. Atmosphere 8 (6): 111.

    Details PDF Project Link




The ScaleX campaigns in the TERENO—preAlpine observatory were designed to address an overarching research question: How well can our observations constrain modeling uncertainties of biogeochemical cycles, and close the balances of energy and matter flows?


Austrian Science Fund (FWF): On the role of advection for the net carbon dioxide exchange of short-statured ecosystems in complex terrain.


EVENT II is a part of a series of field experiments in the Ecological Botanical Garden of the University of Bayreuth termed the EVENT Experiments with international and interdisciplinary research cooperation.


The TERRECO-IRTG program examines the way to carry out land management in mountain regions, in order to ensure sustainable yield of ecosystem services. Ecosystem services are all of the products and gains that people obtain from natural ecosystems and natural resources in a region.




  • Zhao, P.; Li, Y.. 2018. Learning R. Yanjiu Press. Beijing.

R Packages

  • et (docs): A kinetic model for evaluating the gradient method for surface-atmosphere flux measurement of reactive gases.
  • eddyr (docs): Post-processing eddy covariance data.
  • rosr (docs): Creating a project for open science and reproducible research.
  • biber (docs): A tool for bibliometrics.
  • blogdownplus (docs): Assistant for building blogdown sites.
  • rmd (docs, CRAN, GitHub): Easily installs and loads the R Markdown family. rmd
  • packr (docs, GitHub): Create an R package that can easily install and load a group of R packages.
  • advr (docs, GitHub): Functions I use for processing advection flux data.
  • steemr (docs, CRAN, GitHub): Process Steem data. steemr
  • mf (docs, GitHub): Functions I often use in micrometeorology and other work.
  • beginr (docs, CRAN, GitHub): Functions for R Beginners. beginr
  • bookdownplus (docs, CRAN, GitHub): Generate Varied Types of Books and Documents with R ‘bookdown’ Package. bookdownplus
  • mindr (docs, CRAN, GitHub): Convert Files Between Markdown or Rmarkdown Files and Mindmaps. mindr
  • pinyin (docs, CRAN, GitHub): Convert Chinese Characters into Pinyin. pinyin