Message-ID: <87a9wh53hg.fsf@sklar.v.cablecom.net>
Date: 2012-09-22T18:14:51Z
From: Marius Hofert
Subject: How to determine R version?
In-Reply-To: <54E8D652-FFA4-4BA9-A884-9FAB2BEB8699@xs4all.nl> (Berend Hasselman's message of "Sat, 22 Sep 2012 20:04:39 +0200")
Thanks, Berend, that works.
Cheers,
Marius
Berend Hasselman <bhh at xs4all.nl> writes:
> On 22-09-2012, at 19:32, Marius Hofert wrote:
>
>> Hi,
>>
>> What's the best approach to determine if a user uses an R version before 2.15.1
>> patched?
>> I know that the sessionInfo() command provides details, but I'm not sure how
>> the output of sessionInfo() is best used to determine R versions. This seems to
>> work, but a) there is certainly a better way and b) I'm not sure where the
>> "patched" will appear in the string.
>>
>> if(sessionInfo()$R.version$minor < "15.1") ...
>
> ?getRversion
>
> is an option
>
> Berend
>