File: S4R.R

package info (click to toggle)
r-cran-rpostgresql 0.7-7%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 720 kB
  • sloc: sh: 3,070; ansic: 3,054; makefile: 7
file content (25 lines) | stat: -rw-r--r-- 710 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## R/S-Plus compatibility
## $Id$

## This package was developed as a part of Summer of Code program organized by Google.
## Thanks to David A. James & Saikat DebRoy, the authors of RMySQL package.
## Code from RMySQL package was reused with the permission from the authors.
## Also Thanks to my GSoC mentor Dirk Eddelbuettel for helping me in the development.


usingR <- function(major=0, minor=0){
    if(is.null(version$language))
        return(FALSE)
    if(version$language!="R")
        return(FALSE)
    version$major>=major && version$minor>=minor
}

## constant holding the appropriate error class returned by try()
if(usingR()){
    ErrorClass <- "try-error"
} else {
    ErrorClass <- "Error"
}