[Soiltexture-commits] r56 - pkg/soiltexture/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Nov 1 11:13:24 CET 2011
Author: jmoeys
Date: 2011-11-01 11:13:24 +0100 (Tue, 01 Nov 2011)
New Revision: 56
Modified:
pkg/soiltexture/R/onAttach.R
Log:
Fixed an encoding issue with the Polish triangle under Mac
Modified: pkg/soiltexture/R/onAttach.R
===================================================================
--- pkg/soiltexture/R/onAttach.R 2011-11-01 10:12:46 UTC (rev 55)
+++ pkg/soiltexture/R/onAttach.R 2011-11-01 10:13:24 UTC (rev 56)
@@ -2,20 +2,29 @@
libname,
pkgname
){ #
+ cat( "'", pkgname, "' loaded.\n" )
+ #
# Setup the polish triangle and language setting
- source( system.file( "polish_triangle.r", package = pkgname ), encoding = "UTF-8" )
- source( system.file( "polish_language.r", package = pkgname ), encoding = "UTF-8" )
+ if( Sys.info()["sysname"] != "Mac" )
+ { #
+ source( system.file( "polish_triangle.r", package = pkgname ), encoding = "UTF-8" )
+ source( system.file( "polish_language.r", package = pkgname ), encoding = "UTF-8" )
+ #
+ lang.par <- TT.get( "lang.par" )
+ lang.par <- rbind(
+ lang.par,
+ lang.par2
+ ) #
+ #
+ # rm( lang.par2 )
+ #
+ TT.set( "lang.par" = lang.par )
+ }else{
+ cat( "\tPolish diagram and language are not default loaded for Macs,\n" )
+ cat( "\ttype source( system.file( 'polish_triangle.r', package = pkgname ), encoding = 'UTF-8' )\n" )
+ cat( "\tand source( system.file( 'polish_language.r', package = pkgname ), encoding = 'UTF-8' )\n" )
+ cat( "\tto load them (if it works)" )
+ } #
#
- lang.par <- TT.get( "lang.par" )
- lang.par <- rbind(
- lang.par,
- lang.par2
- ) #
- #
- # rm( lang.par2 )
- #
- TT.set( "lang.par" = lang.par )
- #
- cat( "'", pkgname, "' has been loaded.\n" )
} #
More information about the Soiltexture-commits
mailing list