How to install RMySQL package [duplicate] - sql

I tried to use RMySQL package but i get this error doing:
install.packages('RMySQL')
Warning in install.packages :
package ‘RMySQL’ is not available (for R version 2.14.2)
What can I do to use MySQL with R?
Thank you!

There is not a windows binary available for the package RMySQL. This means you will have to install this package from source and build it yourself.
At the CRAN RMySql page you will notice there is no binary available, with a link to Pre-compiled binary packages for R-2.14.x for Windows
From this page:
Packages related to many database system must be linked to the exact
version of the database system the user has installed, hence it does
not make sense to provide binaries for packages
RMySQL, ROracle, ROracleUI,
although it is possible to install such packages from sources by
install.packages('packagename', type='source')
after reading the manual 'R Installation and Administration'.
So, read the manuals, in particular R Installation and Administration, install RTools, and then use:
install.packages('RMySQL', type='source')

After installing Rtools, from the RMySQL CRAN page grab the source from the Package source: link to ensure that you have the latest version. Then read the information in the INSTALL file that comes with the package (or find the same info at the Installation: link on the aforementioned CRAN page).
The main problem that most people have is following outdated information on the internet that pertains to older versions of RMySQL rather than using the instructions that come with the package itself.

After spending 10Hours,I followed Arne's instructions and Willem's comment from here:
http://www.ahschulz.de/2013/07/23/installing-rmysql-under-windows/ and it worked like magic.

I experienced some difficulty with installing RMySQL package in R, twice this year. I haven't used it, yet. To help me in getting around the known additional problems, I followed the steps I found in these two articles:
Installing RMySQL under Windows
Vanderbilt University RMySQL page
First you need to download, install and configure MySQL to work with Windows. Next, you will have to create or edit a file called Renviron.site, and add the variable MYSQL_HOME to your default environment, and other tricky tweaks that may have worked for other people, but have not worked for me.
It appears that running RMySQL on Windows is not advised; there are other packages that you can use to get R to work with MySQL. I've been checking out R bloggers, R Studio Support and the R Help Mailing List, for ways to get around the problem.
Although they're useful resources, there is no guarantee that the troubleshooting steps will work for everyone. You can try following them to install RMySQL package, and if they work you should be able to use the package with R.

Related

Given an npm package, how do I know whether it will work in browser?

I've recently installed some npm package (recommended Kubernetes client) for my react app.
After writing code that uses the package and deploying the code for testing I got some weird errors about missing functions or packages. Then I've read the documentation and realized that the package was Node-only.
Is there any way to check that the npm package works in browser before writing code that uses the package?
Python packages specify compatible python versions. Do npm packages have something like this whether they indicate support for particular Node versions and the browsers?
Some packages/libraries contain .browserlistrc file which I've found to be a starting point to find out the browsers and platforms the devs intend to support or have their code compile for. While it may not always be true and the package might just be able to support a browser that isn't mentioned, it's a good starting point. It surely helps to find out if IE (the bane of front-end dev) is supported or not.
Then again many packages don't necessarily include a .browserlistrc. You can then check the package.json for a "browserslist" field.
If neither are found, you can always clone the repo and add your own .browserlistrc in the root with queries that will let you know if the package supports your intended browser or platform - little more work but yeah it can help. Not full proof but a decent enough way to find out.
Though the best answer is really to just ask the maintainers.

Where can I download mono-4.6.1.5?

For a particular script, I need to download the package mono-4.6.1.5 for Ubuntu 20.04 LTS.
However, I can not do it from the official mono web site.
Anyone knows where I could get the .tar.gz package since the one I have is corrupted?
Thank you in advance.
Best regards.
It is always recommended to run latest maintained and compatible version of packages complying with the operating system, excluding specific cases such as experimental purposes and etc.
But if you still need this specified version, you can find the "tar.bz2" format file on this page. There are certain ways to install a tar.bz2 file on Ubuntu, but if you need the tar.gz file, you can convert it by a similar way explained here.
P.S: I'm aware that this package is from a Fedora repo, but I have successfully tried and installed Fedora packages on my Ubuntu 18.04 before. I assume this might also work for you.
Ho, btw, I found another link in my archives: mono project

What happened to the chorddiag package in R?

While working in Rstudio, I cannot seem to find the chorddiag package. Does it still exist? I've restarted Rstudio in 3.3, 3.5, and 4.0 versions of R, and each seem unable to find the package using either devtools::install_github("mattflor/chorddiag") or the install.package tools. Moreover, after installing devtools, it cannot be found. I'm still learning R, so I'm probably doing something wrong. But I can't figure out what it is.
I was able to complete the install and load the library doing the following:
install.packages("devtools")
devtools::install_github("mattflor/chorddiag", build_vignettes = TRUE)
library(chorddiag)
I'm using R version 4.0.3 (2020-10-10) on Windows 10 via Rstudio.
No one seems to have an answer. So I've gone to the raw html and css to adjust the diagram. It's painstaking work, but worth the effort. I'm leaving copyright claims in place within the code.

Any way to check that package.json engines satisfies version of global installed packages/binaries?

As I understand, the engines object is only for cases where someone installs my application. I would like to have something similar where I can prevent compiling errors on employee systems (because of wrong node versions etc.) before they happen.
I found that there are two packages:
https://github.com/jgillich/npm-check-engines/blob/master/index.js
https://github.com/kruppel/check-engines
But they are not working or not doing what I want.
It would be nice to have a script running before npm install that checks these engines versions and if they are available in path.
I created a package that does this.
https://github.com/muuvmuuv/npm-supervisor
It can be run via npm before installation and will check if a version in engines satisfies the global or local installed version.

Install npgsql for PowerBI

I'm not a programmer and I haven´t Visual Studio installed in my PC but I need npgsql to connect Microsoft PowerBI (Power Query) to a Postgres instance.
Is there a way to install it without having to compile it?
Is it necessary to do special configurations in my PC to make it work?
Thank you very much.
Javier
To expand on #Shay's comment, you can use nuget if you want the latest version of Npgsql.
You don't need to install nuget.exe; you can down download the latest nuget package from http://packages.nuget.org/api/v1/package/Npgsql/
Rename the .NUPKG file as .ZIP and unzip it, and you'll find Npgsql.dll in /lib/net45.
Office.com instructions indicate you'll also need Mono.Security.dll, whcih you can download at http://packages.nuget.org/api/v1/package/Mono.Security/
It seems the Office.com instructions are slightly out of date, because the latest Npgsql GitHub releases aren't including compiled binary downloads. You can follow the Office.com instructions after downloading an older GitHub release.
(It may also work to just run the setup EXE instead of continuing with the Office.com instructions.)