Re: [R] CandlestickCharts of any listed stock and fetching stock prices into R
Hi Winod, Your first error message seems to be saying that you are passing a function that returns an "ohic" object rather than the object. Maybe: ohic<-get.ohlc.yahoo("GOOG",start="2020-12-18",end="2021-12-17") candlestickChart(ohic,..) would get you a bit further. Also it's obvious that the function wants character dates with quotes around them. There seem to be quite a few YouTube tutorials on candlestick charts. Jim On Sun, Dec 19, 2021 at 1:15 AM Winod Dhamnekar wrote: > > Hello, > R users community, > I want to plot candlestickCharts of any stock prices of listed companies > on any stock exchange (Indian or worldwide) into r by using > candlestickchart command in 'FinCal' r package. But I could not plot > candlestic charts. R showed me errors. > > > candlestickChart(ohlc,2020-12-18,2021-12-17,"Google") > Error in as.Date(ohlc$date) : object 'ohlc' not found > > candlestickChart(get.ohlc.google,2020-12-18,2021-12-17,"Google") > Error: object of type 'closure' is not subsettable > > candlestickChart(get.ohlc.google,2020-12-18,2021-12-17,"Google") > Error: object of type 'closure' is not subsettable > > > What is the suitable syntax to use candlestickchart command from 'FinCal' r > package? > > I also tried to fetch stock prices of listed companies on any stock > exchange (wordwide or Indian) But I could not fetch stock prices. > # google <- get.ohlc.yahoo("GOOG",start="2014-07-01",end="2014-08-01"); > candlestickChart(google) > # google <- get.ohlc.yahoo("GOOG",start="2020-12-18",end="2021-12-17"); > candlestickChart(google) > > candlestickChart(ohlc,2020-12-18,2021-12-17,"Google") > Error in as.Date(ohlc$date) : object 'ohlc' not found > > candlestickChart(get.ohlc.google,2020-12-18,2021-12-17,"Google") > Error: object of type 'closure' is not subsettable > > candlestickChart(get.ohlc.google,2020-12-18,2021-12-17,"Google") > Error: object of type 'closure' is not subsettable > > get.ohlc.yahoo("BOM:532504", 18-12-2021,17-12-2021,d) > Error in strsplit(start, "-") : non-character argument > > get.ohlc.yahoo('BOM:532504', 18-12-2021,17-12-2021,d) > Error in strsplit(start, "-") : non-character argument > > get.ohlc.yahoo(BOM:532504, 18-12-2021,17-12-2021,d) > Error in strsplit(start, "-") : non-character argument > # google <- get.ohlc.yahoo("GOOG",start="2020-12-18",end="2021-12-17"); > candlestickChart(google) > > candlestickChart(ohlc,2020-12-18,2021-12-17,"Google") > Error in as.Date(ohlc$date) : object 'ohlc' not found > > candlestickChart(get.ohlc.google,2020-12-18,2021-12-17,"Google") > Error: object of type 'closure' is not subsettable > candlestickChart(ohlc,2020-12-18,2021-12-17,"Google") > Error in as.Date(ohlc$date) : object 'ohlc' not found > > How can I plot candlestickchart and fetch stock prices of any period with > any frequency of time intervals? > > [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] CandlestickCharts of any listed stock and fetching stock prices into R
Note also that there is an r-sig-finance list that would be a better place to post such queries. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sat, Dec 18, 2021 at 10:50 AM Bert Gunter wrote: > > Please read and follow the Posting Guide linked below, which says, > among other things: > > "For questions about functions in standard packages distributed with R > (see the FAQ Add-on packages in R), ask questions on R-help. > [The link is: > https://cran.r-project.org/doc/FAQ/R-FAQ.html#Add-on-packages-in-R > This gives the list of current _standard_ packages] > > If the question relates to a contributed package [such as FinCal] , > e.g., one downloaded from CRAN, **try contacting the package > maintainer first**. You can also use find("functionname") and > packageDescription("packagename") to find this information. Only send > such questions to R-help or R-devel if you get no reply or need > further assistance. This applies to both requests for help and to bug > reports." > > > Bert Gunter > > "The trouble with having an open mind is that people keep coming along > and sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Sat, Dec 18, 2021 at 6:15 AM Winod Dhamnekar > wrote: > > > > Hello, > > R users community, > > I want to plot candlestickCharts of any stock prices of listed companies > > on any stock exchange (Indian or worldwide) into r by using > > candlestickchart command in 'FinCal' r package. But I could not plot > > candlestic charts. R showed me errors. > > > > > > candlestickChart(ohlc,2020-12-18,2021-12-17,"Google") > > Error in as.Date(ohlc$date) : object 'ohlc' not found > > > candlestickChart(get.ohlc.google,2020-12-18,2021-12-17,"Google") > > Error: object of type 'closure' is not subsettable > > > candlestickChart(get.ohlc.google,2020-12-18,2021-12-17,"Google") > > Error: object of type 'closure' is not subsettable > > > > > > What is the suitable syntax to use candlestickchart command from 'FinCal' r > > package? > > > > I also tried to fetch stock prices of listed companies on any stock > > exchange (wordwide or Indian) But I could not fetch stock prices. > > # google <- get.ohlc.yahoo("GOOG",start="2014-07-01",end="2014-08-01"); > > candlestickChart(google) > > # google <- get.ohlc.yahoo("GOOG",start="2020-12-18",end="2021-12-17"); > > candlestickChart(google) > > > candlestickChart(ohlc,2020-12-18,2021-12-17,"Google") > > Error in as.Date(ohlc$date) : object 'ohlc' not found > > > candlestickChart(get.ohlc.google,2020-12-18,2021-12-17,"Google") > > Error: object of type 'closure' is not subsettable > > > candlestickChart(get.ohlc.google,2020-12-18,2021-12-17,"Google") > > Error: object of type 'closure' is not subsettable > > > > get.ohlc.yahoo("BOM:532504", 18-12-2021,17-12-2021,d) > > Error in strsplit(start, "-") : non-character argument > > > get.ohlc.yahoo('BOM:532504', 18-12-2021,17-12-2021,d) > > Error in strsplit(start, "-") : non-character argument > > > get.ohlc.yahoo(BOM:532504, 18-12-2021,17-12-2021,d) > > Error in strsplit(start, "-") : non-character argument > > # google <- get.ohlc.yahoo("GOOG",start="2020-12-18",end="2021-12-17"); > > candlestickChart(google) > > > candlestickChart(ohlc,2020-12-18,2021-12-17,"Google") > > Error in as.Date(ohlc$date) : object 'ohlc' not found > > > candlestickChart(get.ohlc.google,2020-12-18,2021-12-17,"Google") > > Error: object of type 'closure' is not subsettable > > candlestickChart(ohlc,2020-12-18,2021-12-17,"Google") > > Error in as.Date(ohlc$date) : object 'ohlc' not found > > > > How can I plot candlestickchart and fetch stock prices of any period with > > any frequency of time intervals? > > > > [[alternative HTML version deleted]] > > > > __ > > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] CandlestickCharts of any listed stock and fetching stock prices into R
Please read and follow the Posting Guide linked below, which says, among other things: "For questions about functions in standard packages distributed with R (see the FAQ Add-on packages in R), ask questions on R-help. [The link is: https://cran.r-project.org/doc/FAQ/R-FAQ.html#Add-on-packages-in-R This gives the list of current _standard_ packages] If the question relates to a contributed package [such as FinCal] , e.g., one downloaded from CRAN, **try contacting the package maintainer first**. You can also use find("functionname") and packageDescription("packagename") to find this information. Only send such questions to R-help or R-devel if you get no reply or need further assistance. This applies to both requests for help and to bug reports." Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sat, Dec 18, 2021 at 6:15 AM Winod Dhamnekar wrote: > > Hello, > R users community, > I want to plot candlestickCharts of any stock prices of listed companies > on any stock exchange (Indian or worldwide) into r by using > candlestickchart command in 'FinCal' r package. But I could not plot > candlestic charts. R showed me errors. > > > candlestickChart(ohlc,2020-12-18,2021-12-17,"Google") > Error in as.Date(ohlc$date) : object 'ohlc' not found > > candlestickChart(get.ohlc.google,2020-12-18,2021-12-17,"Google") > Error: object of type 'closure' is not subsettable > > candlestickChart(get.ohlc.google,2020-12-18,2021-12-17,"Google") > Error: object of type 'closure' is not subsettable > > > What is the suitable syntax to use candlestickchart command from 'FinCal' r > package? > > I also tried to fetch stock prices of listed companies on any stock > exchange (wordwide or Indian) But I could not fetch stock prices. > # google <- get.ohlc.yahoo("GOOG",start="2014-07-01",end="2014-08-01"); > candlestickChart(google) > # google <- get.ohlc.yahoo("GOOG",start="2020-12-18",end="2021-12-17"); > candlestickChart(google) > > candlestickChart(ohlc,2020-12-18,2021-12-17,"Google") > Error in as.Date(ohlc$date) : object 'ohlc' not found > > candlestickChart(get.ohlc.google,2020-12-18,2021-12-17,"Google") > Error: object of type 'closure' is not subsettable > > candlestickChart(get.ohlc.google,2020-12-18,2021-12-17,"Google") > Error: object of type 'closure' is not subsettable > > get.ohlc.yahoo("BOM:532504", 18-12-2021,17-12-2021,d) > Error in strsplit(start, "-") : non-character argument > > get.ohlc.yahoo('BOM:532504', 18-12-2021,17-12-2021,d) > Error in strsplit(start, "-") : non-character argument > > get.ohlc.yahoo(BOM:532504, 18-12-2021,17-12-2021,d) > Error in strsplit(start, "-") : non-character argument > # google <- get.ohlc.yahoo("GOOG",start="2020-12-18",end="2021-12-17"); > candlestickChart(google) > > candlestickChart(ohlc,2020-12-18,2021-12-17,"Google") > Error in as.Date(ohlc$date) : object 'ohlc' not found > > candlestickChart(get.ohlc.google,2020-12-18,2021-12-17,"Google") > Error: object of type 'closure' is not subsettable > candlestickChart(ohlc,2020-12-18,2021-12-17,"Google") > Error in as.Date(ohlc$date) : object 'ohlc' not found > > How can I plot candlestickchart and fetch stock prices of any period with > any frequency of time intervals? > > [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] CandlestickCharts of any listed stock and fetching stock prices into R
Hello, R users community, I want to plot candlestickCharts of any stock prices of listed companies on any stock exchange (Indian or worldwide) into r by using candlestickchart command in 'FinCal' r package. But I could not plot candlestic charts. R showed me errors. candlestickChart(ohlc,2020-12-18,2021-12-17,"Google") Error in as.Date(ohlc$date) : object 'ohlc' not found > candlestickChart(get.ohlc.google,2020-12-18,2021-12-17,"Google") Error: object of type 'closure' is not subsettable > candlestickChart(get.ohlc.google,2020-12-18,2021-12-17,"Google") Error: object of type 'closure' is not subsettable What is the suitable syntax to use candlestickchart command from 'FinCal' r package? I also tried to fetch stock prices of listed companies on any stock exchange (wordwide or Indian) But I could not fetch stock prices. # google <- get.ohlc.yahoo("GOOG",start="2014-07-01",end="2014-08-01"); candlestickChart(google) # google <- get.ohlc.yahoo("GOOG",start="2020-12-18",end="2021-12-17"); candlestickChart(google) > candlestickChart(ohlc,2020-12-18,2021-12-17,"Google") Error in as.Date(ohlc$date) : object 'ohlc' not found > candlestickChart(get.ohlc.google,2020-12-18,2021-12-17,"Google") Error: object of type 'closure' is not subsettable > candlestickChart(get.ohlc.google,2020-12-18,2021-12-17,"Google") Error: object of type 'closure' is not subsettable get.ohlc.yahoo("BOM:532504", 18-12-2021,17-12-2021,d) Error in strsplit(start, "-") : non-character argument > get.ohlc.yahoo('BOM:532504', 18-12-2021,17-12-2021,d) Error in strsplit(start, "-") : non-character argument > get.ohlc.yahoo(BOM:532504, 18-12-2021,17-12-2021,d) Error in strsplit(start, "-") : non-character argument # google <- get.ohlc.yahoo("GOOG",start="2020-12-18",end="2021-12-17"); candlestickChart(google) > candlestickChart(ohlc,2020-12-18,2021-12-17,"Google") Error in as.Date(ohlc$date) : object 'ohlc' not found > candlestickChart(get.ohlc.google,2020-12-18,2021-12-17,"Google") Error: object of type 'closure' is not subsettable candlestickChart(ohlc,2020-12-18,2021-12-17,"Google") Error in as.Date(ohlc$date) : object 'ohlc' not found How can I plot candlestickchart and fetch stock prices of any period with any frequency of time intervals? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] nlme::lme sigma parameter standard deviation or variance?
Modifying the first example in help('lme', pac='nlme'): library(nlme) fm1 <- lme(distance ~ age, data = Orthodont) # random is ~ age fm1$sigma fm1.2 <- lme(2*distance ~ age, data = Orthodont) # random is ~ age fm1.2$sigma Conclusion: Standard deviation, as indicated in help('lmeObject'). Hope this helps. Spencer Graves On 12/18/21 4:00 AM, Eric Berger wrote: You can run a test. Multiply all your data by a scalar, say 2. If this changes the result lme_mod$sigma by a factor of 2, then it is a std deviation. If it changes the result by a factor of 4, then it is a variance. HTH, Eric On Sat, Dec 18, 2021 at 11:26 AM Courtney Van Den elzen wrote: Hi R-help, I am a researcher fitting linear mixed models using the package nlme. I am wondering whether the sigma value that is outputted as part of the model object is standard deviation or variance? for example, I might fit a model lme_mod <- nlme::lme(response ~ predictor1 + predictor2, random = (~1|grouping1)) I am wondering whether lme_mod$sigma is actually a standard deviation or if it's a variance. Thanks so much, Courtney [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] problem with RSelenium....
dear members, I am using RSelenium. I have downloaded the java binary standalone server. I am running it in my windows powershell with the following command: java -jar selenium-server-standalone-4.0.0-alpha-2.jar (note that the command doesn't get finished in the powershell ( the prompt doesn't return to C"\Users\Administrator\Downloads after running the command)). Then I run the following in R console: > remDr <- remoteDriver(remoteServerAddr = "localhost", port = L, > browserName = "chrome") and then the following: > remDr$open It gives me the following error: [1] "Connecting to remote server" Selenium message:Unable to create new service: ChromeDriverService Build info: version: '4.0.0-alpha-2', revision: 'f148142cf8', time: '2019-07-01T21:30:10' System info: host: 'EC2AMAZ-1JRGETJ', ip: '172.31.9.48', os.name: 'Windows Server 2016', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.1' Driver info: driver.version: unknown Error: Summary: SessionNotCreatedException Detail: A new session could not be created. Further Details: run errorDetails method Please note that I'm fine with using rsDriver. What's going on? (I'm using remoteDriver instaed of rsDriver because it should not give the "port already in use" error. Thanking you, Yours sincerely, AKSHAY M KULKARNI [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] nlme::lme sigma parameter standard deviation or variance?
You can run a test. Multiply all your data by a scalar, say 2. If this changes the result lme_mod$sigma by a factor of 2, then it is a std deviation. If it changes the result by a factor of 4, then it is a variance. HTH, Eric On Sat, Dec 18, 2021 at 11:26 AM Courtney Van Den elzen wrote: > > Hi R-help, > > I am a researcher fitting linear mixed models using the package nlme. I am > wondering whether the sigma value that is outputted as part of the model > object is standard deviation or variance? for example, I might fit a model > > lme_mod <- nlme::lme(response ~ predictor1 + predictor2, random = > (~1|grouping1)) > > I am wondering whether lme_mod$sigma is actually a standard deviation or if > it's a variance. > > Thanks so much, > Courtney > > [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] nlme::lme sigma parameter standard deviation or variance?
Hi R-help, I am a researcher fitting linear mixed models using the package nlme. I am wondering whether the sigma value that is outputted as part of the model object is standard deviation or variance? for example, I might fit a model lme_mod <- nlme::lme(response ~ predictor1 + predictor2, random = (~1|grouping1)) I am wondering whether lme_mod$sigma is actually a standard deviation or if it's a variance. Thanks so much, Courtney [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.