Hi R,
Here's my question about accessing the class of an object.
I have an object "dat" which can take any two of the classes, ("dates"
"times") or ("chron" "dates" "times). Note that the classes have two
elements within it. I want to read these classes in such a way that
v=class(dat) # let class(dat)= "dates" "times"
If(class(dat)==v) k=1 else k=0
The problem is I can't read the above class. The error which I get for
the above if statement is as follows:
Warning message:
the condition has length > 1 and only the first element will be used in:
if (class(index(intra)) == v) k = 1
How should I proceed with this? Any ideas? I tried with readline to read
the class and access it in the 'if' statement...But doesn't work :-(