Friday, October 22, 2010

Subversion in Debian server/Ubuntu client

#In the debian server :

#Create an empty data repository
cd /data/aaworks/
svnadmin create R_repository

#Import already existing source files into it
svn import SeaWiFS_bio/Rfiles/Ekumen_R/ file:///data/aaworks/R_repository/Ekumen_R/

#List the imported files
svn list file:///data/aaworks/R_repository/Ekumen_R

#Create a working directory and checkout
cd ~
mkdir Ekumen_R/
svn checkout file:///data/aaworks/R_repository/Ekumen_R

cd Ekumen_R/
svn list

#After modifiying a source file, one can commit :
svn commit

#You can checkout files in the ubuntu client through ssh :
svn checkout svn+ssh://ekumen/data/aaworks/R_repository/Ekumen_R

Friday, October 1, 2010

Julian date conversion in R

Convert the Julian day into Date format
strptime("180", "%j")

or

strptime("1998249", "%Y%j")
[1] "1998-09-06"