Re: [R] warnng to an error....

2023-06-19 Thread akshay kulkarni
u, Yours sincerely, AKSHAY M KULKARNI > From: Bert Gunter > Sent: Saturday, June 17, 2023 > 11:28 PM To: akshay kulkarni Cc: R > help Mailing list Subject: Re: [R] > warnng to an error > What is class(x) ?? >

Re: [R] warnng to an error....

2023-06-19 Thread Martin Maechler
ing you, Yours sincerely, AKSHAY M KULKARNI > From: Bert Gunter > Sent: Saturday, June 17, 2023 > 11:28 PM To: akshay kulkarni Cc: R > help Mailing list Subject: Re: [R] > warnng to an error > What is class(x) ?? &

Re: [R] warnng to an error....

2023-06-17 Thread akshay kulkarni
Dear Bert, Duncan's theory is workingprobably the same as yours... THanking you, Yours sincerely, AKSHAY M KULKARNI From: Bert Gunter Sent: Saturday, June 17, 2023 11:28 PM To: akshay kulkarni Cc: R help Mailing list Subject: Re: [R] w

Re: [R] warnng to an error....

2023-06-17 Thread akshay kulkarni
Dear Duncan, THankls a lot... THanking you, Yours sincerely, AKSHAY M KULKARNI From: Duncan Murdoch Sent: Saturday, June 17, 2023 11:36 PM To: akshay kulkarni ; R help Mailing list Subject: Re: [R] warnng to an error On 17/06/2023 1

Re: [R] warnng to an error....

2023-06-17 Thread Duncan Murdoch
On 17/06/2023 1:16 p.m., akshay kulkarni wrote: Dear members, I have the following code: FUN(OHLCDataEP[[63]]) Error in (class(x) == "xts") || (class(x) == "zoo") : 'length = 2' in coercion to 'logical(1)' traceback() 2: ygix(x, "c") at #9 1: FUN(OHLCDataEP[[63

Re: [R] warnng to an error....

2023-06-17 Thread Bert Gunter
What is class(x) ?? I think you need to (re?) learn about S3 classes, which can in general be vectors. See ?class (the S3 portion) or any tutorial on S3 classes in R. I have no idea what you are trying to do, but I *suspect* it may be accomplished through S3 inheritance rather than changing the cl

Re: [R] warnng to an error....

2023-06-17 Thread akshay kulkarni
Dear members, AN update: I have changed the if clause to: if(class(x)[1] == "xts") || class(x)[2] == "zoo") {code} but am bootless. PLease help... THanking you, Yours sincerely, AKSHAY M KULKARNI From: R-help on behalf of akshay k