[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-sig-teaching
Subject:    Re: [R-sig-teaching] workspace management
From:       Gabor Grothendieck <ggrothendieck () gmail ! com>
Date:       2010-12-06 11:38:16
Message-ID: AANLkTik7uO3+=_8Zs-FCYmYQcLwoGAs1-E32eyERZ1-t () mail ! gmail ! com
[Download RAW message or body]

On Mon, Dec 6, 2010 at 6:27 AM, david monterde <dmonterde@me.com> wrote:
> I use the select.list when I have welldefined the paths and the fix function when \
> not I start idetifyind the unit, and then the rest of the path:
> 
> unit   <- select.list(paste(letters,":/",sep=""))
> paths <- c("Projects/Data/", "MyPenDrive/Projects/Data")
> path  <- select.list(paths)
> path  <- paste(unit,path,sep="")
> 
> So I can work with the same program in any computer using my pendrive, or in my \
> computer using my own path. 
> If there is not a fixed path:
> 
> path <- "c:/new path/"
> fix(path)
> 
> You can use the select-list function to choose between different platforms, (Linux, \
> Mac, Windows): 
> OS   <- select.list("Lunix,"Mac","Windows")
> if (OS=="Linux") then { # use the select.list function with paths in Linux format \
> (//users//) } if (OS=="Windows") then { # use the select.list function with paths \
> in Linux format (c:/) } 

You can detect windows vs. unix using .Platform$OS eliminating a
question to the user.  See ?.Platform

-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com

_______________________________________________
R-sig-teaching@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-teaching


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic