[R] Cannot run install binary package on Windows 8
Hi all, I am just starting with R and cannot use lmtest package on Windows 8. This package contains dwtest function that I am interested in. I began with installing the core of R (with rgui) - version 3.1.3 64-bit. Then I installed lmtest package using GUI menu, but after success message I cannot run dwtest() getting message that the it cannot find the function. When I used installed.packages() function I saw lmtest on the list but there was yes under the NeedsCompilation column. Does it mean I need to compile the package in order to use it? I uninstalled lmtest and tried to put binary Windows version by downloading zip file from here: http://cran.r-project.org/web/packages/lmtest/index.html I took the file: http://cran.r-project.org/bin/windows/contrib/3.1/lmtest_0.9-33.zip downloaded it and tried to use the function of installing from local zip file. However the effect was the same: NeedsCompilation set to true, dwtest does not work. The package contains binary file for 64-bit (DLLs). What can I do in order to run this? __ 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] Removing words and initials with tm
Hi Jim The name's come up on my radar, but that's about it. I'll look into it. Thanks for the reference. All the best S On 10/04/15 23:36, Jim Lemon wrote: Hi Sun, No, I was thinking of something like hunspell, which seems to fit into the sort of work that you are doing. Jim On Fri, Apr 10, 2015 at 11:42 PM, Sun Shine phaedr...@gmail.com mailto:phaedr...@gmail.com wrote: Thanks Jeff. I'll add that to the ever-growing list my current studies are generating daily. :-) Cheers S On 10/04/15 14:32, Jeff Newmiller wrote: I suspect that it might have something to do with regular expressions, but to be honest, I'm (currently) pretty crap with those. I cannot think of a better incentive to take action on this hole in your education and buckle down to learn regular expressions. There are many books and tutorials available. --- Jeff NewmillerThe .. Go Live... DCN:jdnew...@dcn.davis.ca.us mailto:jdnew...@dcn.davis.ca.us Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/BatteriesO.O#.#.O#. with /Software/Embedded Controllers) .OO#..OO#. rocks...1k --- Sent from my phone. Please excuse my brevity. On April 10, 2015 3:19:51 AM PDT, Sun Shine phaedr...@gmail.com mailto:phaedr...@gmail.com wrote: Hi list Using the tm package, part of the pre-processing work is to remove words, etc. from the corpus. I wish to remove people's names and also their initials which are peppered throughout the corpus. But, because some people's initials are the same as parts of common words - e.g. 'am' = 'became' = 'bec e' or 'ec' = 'because' = 'b ause' or 'ar' = 'arrival' = 'rival' (which has a completely different meaning). Is there any way of doing this without leaving a trail of nonsense half-terms behind? I suspect that it might have something to do with regular expressions, but to be honest, I'm (currently) pretty crap with those. Would it make a difference if I removed initials and names *prior* to converting all text to lower case, so I remove 'AM' and because 'became' is lower case, it should remain unaffected? Any recommendations on how best to proceed with this? Thanks as always. Sun __ R-help@r-project.org mailto: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 mailto: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. [[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] multiple input files single output - lapply? - pls advise
Hi Ista This works brilliantly and is so elegant! Yes, i googled quite a while but did not come across do.call till now. Thanks again Bernard On 10 Apr 2015 22:46, Ista Zahn istaz...@gmail.com wrote: Hi Bernard, Did you try searching for an answer? This question (minus the xts part which I don't think will matter) has been asked and answered many times, with do.call(rbind, foo) being a common answer. Best, Ista On Apr 10, 2015 5:35 PM, B Dittmann bd10st...@googlemail.com wrote: Dear R users, hope you can point me in the right direction. I am stuck with the following problem. My function f1 reads csv files, manipulates them into the right xts format and returns the output at the end. This works perfectly fine. Now, I need to run f1 over a long list of various csv files, all of the same format, but different dates (or time stamps) which is guaranteed by design. All these individual results per each file I hope to combine into one xts or zoo object. I tried lapply as follows: # all csv files start with z1: file.names - list.files(pattern = z1*, full.names = T, recursive = FALSE) # my function: f1 - function(x, param){ # x: the csv file # param: some parameter for calculation # spits results out return(results) } res - lapply(file.names, function(x){f1(x, param)}) I wrote the output to res and by subsetting res[1], res[2], ... I can retrieve the results of each individual csv file on which I applied my function f1. How could I append or merge all individual results res[i] for my i csv files into one xts or zoo object? Many thanks in advance, Bernard [[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. [[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] searchTwitter
Dear group , I used the following code to download some tweets (1500) library(twitteR) library(ROAuth) library(plyr) library(stringr) library(ggplot2) ## Windows users need to get this file download.file(url=http://curl.haxx.se/ca/cacert.pem;, destfile=cacert.pem) requestURL https://api.twitter.com/oauth/request_token; accessURL = https://api.twitter.com/oauth/access_token; authURL = https://api.twitter.com/oauth/authorize; consumerKey = secret consumerSecret = secret Cred - oauthfactory$new(consumerkey= consumerSecret=consumerSecret, requestURL=requestURL, accessURL=accessURL, authURL=authURL) Cred$handshake(cainfo = system.file(CurlSSL, cacert.pem, package = RCurl) ) registerTwitterOAuth(Cred) save(Cred, file=twitter authentication.Rdata) ### # Chunk - 2 - Twitter Scrape searchTwitter( alhazm, n=1500 , cainfo=cacert.pem ) But I got the following error message In doRppAPICall(search/tweets, n, params = params, retryOnRateLimit = retryOnRateLimit, : 500 tweets were requested but the API can only return 28 why ? and how I can Increase number of retreived tweets, many thanks Ragia [[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] searchTwitter
Dear group I used the following code to download some tweets (1500) library(twitteR) library(ROAuth) library(plyr) library(stringr) library(ggplot2) ## Windows users need to get this file download.file(url=http://curl.haxx.se/ca/cacert.pem;, destfile=cacert.pem) requestURL https://api.twitter.com/oauth/request_token; accessURL = https://api.twitter.com/oauth/access_token; authURL = https://api.twitter.com/oauth/authorize; consumerKey = secret consumerSecret = secret Cred - oauthfactory$new(consumerkey= consumerSecret=consumerSecret, requestURL=requestURL, accessURL=accessURL, authURL=authURL) Cred$handshake(cainfo = system.file(CurlSSL, cacert.pem, package = RCurl) ) registerTwitterOAuth(Cred) save(Cred, file=twitter authentication.Rdata) ### # Chunk - 2 - Twitter Scrape searchTwitter( alhazm, n=1500 , cainfo=cacert.pem ) But I got the following error message In doRppAPICall(search/tweets, n, params = params, retryOnRateLimit = retryOnRateLimit, : 500 tweets were requested but the API can only return 28 why ? and how I can Increase number of retreived tweets, many thanks Ragia [[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] Parallel processing
Dear community, Sory for cross posting. Does anybody have an idea on how I can do parallel in MATLAB? thanks for your help -- John Wasige [[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] Parallel processing in Matlab (irrelevant to R)
Sorry, I think you posted to the wrong group. Ranjan On Sat, 11 Apr 2015 19:01:04 +0200 John Wasige johnwas...@gmail.com wrote: Dear community, Sory for cross posting. Does anybody have an idea on how I can do parallel in MATLAB? thanks for your help -- John Wasige [[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. -- Important Notice: This mailbox is ignored: e-mails are set to be deleted on receipt. Please respond to the mailing list if appropriate. For those needing to send personal or professional e-mail, please use appropriate addresses. FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop! __ 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] Parallel processing
Wrong mailinglist. This one is about R, not matlab. Op 11-apr.-2015 19:03 schreef John Wasige johnwas...@gmail.com: Dear community, Sory for cross posting. Does anybody have an idea on how I can do parallel in MATLAB? thanks for your help -- John Wasige [[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. [[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] Removing words and initials with tm
Hello Sun, The order of the TM transformations makes a lot of difference. It isn't a shortcut, but if you identify all names you could create your own Stop words list: corpus -tm_map(corpus , removeWords, c(english, )) In the case of York, Key Word in Context (KWIC) syntax could be used to check how certain words are used. You could identify the words useages you want to remove or retain and respectively rename the relevant instances. This is labour intensive, but Greis in his Quantitative Corpus Linguistics, notes that sometimes time spent on trying to refine code might be better spent on manual analysis (p164). This book includes a KWIC type function (page 127), but I haven't been able to work out how to modify it to read more than six words either side of the specified word. Six should be adequate for your purpose. Jockers book also includes a KWIC function but I don't believe it searches the entire corpus, rather a specified text. I recently checked and TM doesn't have a KWIC function, but for the R talented (which excludes me) it might be possible to write one. For example, Jim Holtman once wrote a KWIC function to identify word use in a csv file. Bob __ 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] Cannot run install binary package on Windows 8
Did you use the library function to load it into memory? You may need to practise with some simpler tasks using base R before you get too frustrated with using a contributed package. The Introduction to R document that is provided with R is worth your time. --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/BatteriesO.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --- Sent from my phone. Please excuse my brevity. On April 11, 2015 10:39:41 AM PDT, Maciej Węgorkiewicz wegor...@gmail.com wrote: Hi all, I am just starting with R and cannot use lmtest package on Windows 8. This package contains dwtest function that I am interested in. I began with installing the core of R (with rgui) - version 3.1.3 64-bit. Then I installed lmtest package using GUI menu, but after success message I cannot run dwtest() getting message that the it cannot find the function. When I used installed.packages() function I saw lmtest on the list but there was yes under the NeedsCompilation column. Does it mean I need to compile the package in order to use it? I uninstalled lmtest and tried to put binary Windows version by downloading zip file from here: http://cran.r-project.org/web/packages/lmtest/index.html I took the file: http://cran.r-project.org/bin/windows/contrib/3.1/lmtest_0.9-33.zip downloaded it and tried to use the function of installing from local zip file. However the effect was the same: NeedsCompilation set to true, dwtest does not work. The package contains binary file for 64-bit (DLLs). What can I do in order to run this? __ 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] Cannot run install binary package on Windows 8
You need to load the library after you have installed the package. Only libraries in the base R installation load automatically. Thus every time you want to use contributed package XXX you need to issue the command library(XXX) or require(XXX) So at the top of your program try library(lmtest) You should be good to go. Newbies often miss this step. Good luck with R John Kane Kingston ON Canada -Original Message- From: wegor...@gmail.com Sent: Sat, 11 Apr 2015 19:39:41 +0200 To: r-help@r-project.org Subject: [R] Cannot run install binary package on Windows 8 Hi all, I am just starting with R and cannot use lmtest package on Windows 8. This package contains dwtest function that I am interested in. I began with installing the core of R (with rgui) - version 3.1.3 64-bit. Then I installed lmtest package using GUI menu, but after success message I cannot run dwtest() getting message that the it cannot find the function. When I used installed.packages() function I saw lmtest on the list but there was yes under the NeedsCompilation column. Does it mean I need to compile the package in order to use it? I uninstalled lmtest and tried to put binary Windows version by downloading zip file from here: http://cran.r-project.org/web/packages/lmtest/index.html I took the file: http://cran.r-project.org/bin/windows/contrib/3.1/lmtest_0.9-33.zip downloaded it and tried to use the function of installing from local zip file. However the effect was the same: NeedsCompilation set to true, dwtest does not work. The package contains binary file for 64-bit (DLLs). What can I do in order to run this? __ 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. FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop! __ 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] Cannot run install binary package on Windows 8
Maciej Węgorkiewicz wegorkie at gmail.com writes: Hi all, I am just starting with R and cannot use lmtest package on Windows 8. This package contains dwtest function that I am interested in. I began with installing the core of R (with rgui) - version 3.1.3 64-bit. Then I installed lmtest package using GUI menu, but after success message I cannot run dwtest() getting message that the it cannot find the function. This sounds like R FAQ 7.30 http://cran.r-project.org/doc/FAQ/R-FAQ.html# I-installed-a-package-but-the-functions-are-not-there (URL broken to make gmane happy) Try library(lmtest). Everything else you've done after initially installing the package sounds like a wild goose chase ... __ 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.