|
|
|
|
|
by gaha
1796 days ago
|
|
The way I love doing these kinds of things is by literally using three lines of R code: library(sqldf) tab1 = read.csv("file1.csv") sqldf("select * from tab1") sqldf [1] is a library with which you can access R dataframes just like tables in SQL (it is actually using SQLite in the background). I do not have much experience with programming in R itself, but you barely need it. This approach has the advantage that it is very flexible, and you get the power of the (IMHO) best plotting library ggplot with it. Of course, you can also do more complicated stuff like joining multiple dataframes and basically everything else you can do with SQLite, and then store results back in R dataframes. This workflow works if you use an IDE which lets you execute single lines or blocks of codes like R-Studio. Then you also get a nice GUI with it, but there are also plugins for VI/Emacs that work very well. [1] https://cran.r-project.org/web/packages/sqldf/index.html EDIT: code formatting |
|
[0] https://duckdb.org/docs/api/r