fractions(x, cycles = 10, max.denominator = 2000, ...) as.fractions(x) is.fractions(x)## S3 method for class 'fractions': "["(x, ...) ## S3 method for class 'fractions': "[<-"(x, ..., value) ## S3 method for class 'fractions': as.character(x, ...) ## S3 method for class 'fractions': print(x, ...) ## S3 method for class 'fractions': t(x)
# Group functions ## S3 method for class 'fractions': Math(x, ...) ## S3 method for class 'fractions': Ops(e1, e2) ## S3 method for class 'fractions': Summary(x, ..., na.rm)
x | any numeric mode of object for fractions and as.fractions; NA is allowed in this case. Can be an object of class "fractions" for other methods. |
cycles | This argument is ignored. |
max.denominator | The maximum denominator to consider for fractional approximation. |
... | other optional arguments passed to or from methods. |
value | the replacement value for the relevant piece of the object. |
e1, e2 | two objects of class "fractions". |
na.rm | a logical flag. If TRUE, missing values are ignored for the group functions of Summary. |
fractions and as.fractions | return an object of class "fractions", which is a structure with a data value of input x and an attribute "fracs" containing a character vector representing the numerators and denominators. |
is.fractions | returns TRUE if x is an object of class "fractions". Otherwise, it returns FALSE. |
fractions(c(0.2, 1.3, -0.4, 3.25)) A <- fractions(matrix(c(0.2, -0.4, 3.25, 2.5), nrow=2)) A A[2,2] <- 0.85001 # close to 17/20 A fractions(asin(0.965926)/pi)