Re: [R] is.na with lists....

2022-07-02 Thread Avi Gross via R-help
People often use sum() to count how many boolean values are true, not length). Sent from the all new AOL app for Android On Sat, Jul 2, 2022 at 2:14 PM, Andrew Simmons wrote: It's supposed to match the length. Perhaps you meant to use which(is.na())? On Sat, Jul 2, 2022, 14:04 akshay

[R] is.na with lists....

2022-07-02 Thread akshay kulkarni
Dear memebers, I have list of stock data OHLCData for 500 stocks, 15 of whom are NA's. The following is the code: require(quantmod) getOHLCData <- function(NSESym) { OHLCData1 <- list() for(i in 1:500){ OHLCData1[[i]] <- tryCatch(getSymbols(NSESym[i],

Re: [R] A humble request

2022-07-02 Thread Spencer Graves
On 7/2/22 12:30 PM, David Winsemius wrote: On Jul 2, 2022, at 9:32 AM, Muhammad Zubair Chishti wrote: Dear Respected Sir, Thank you for the quick response. However, the link your shared provides the old version of wmtsa that is not working in R 4.2.0. Can you please tell me any other

Re: [R] A humble request

2022-07-02 Thread Ebert,Timothy Aaron
Would package versions help? It would allow you to install a specific version of wmtsa into R 4.2. Tim -Original Message- From: R-help On Behalf Of Muhammad Zubair Chishti Sent: Saturday, July 2, 2022 12:39 PM To: Spencer Graves ; r-help@r-project.org Subject: Re: [R] A humble request

Re: [R] A humble request

2022-07-02 Thread Spencer Graves
Are you familiar with the "debug" function? You can download the package, source the function you want to use. If it doesn't run or doesn't seem to give a sensible answer, debug(fun) followed by fun(arg1, arg2, arg3) will start the function then stop and invite you to walk

Re: [R] A humble request

2022-07-02 Thread Rainer Hurling
Hi Muhammad, Am 02.07.22 um 18:11 schrieb Muhammad Zubair Chishti: Dear Experts, I cannot find a package "wmtsa" for my R version "R 4.2.0". Kindly help me to find it or share the link with me. Although I tried the old version of "wmtsa" but failed. Thank you for your precious time. Regards

[R] A humble request

2022-07-02 Thread Muhammad Zubair Chishti
Dear Experts, I cannot find a package "wmtsa" for my R version "R 4.2.0". Kindly help me to find it or share the link with me. Although I tried the old version of "wmtsa" but failed. Thank you for your precious time. Regards Muhammad Zubair Chishti [[alternative HTML version deleted]]

Re: [R] Subsetting a vector using an index with all missing values

2022-07-02 Thread Peter Langfelder
Ah, thanks, that makes sense. Peter On Fri, Jul 1, 2022 at 10:01 PM Bill Dunlap wrote: > > This has to do with the mode of the subscript - logical subscripts are > repeated to the length of x and integer/numeric ones are not. NA is logical, > NA_integer_ is integer, so we get > > > x <- 1:10