Links
Archives
- 01/01/2003 - 02/01/2003
- 02/01/2003 - 03/01/2003
- 03/01/2003 - 04/01/2003
- 05/01/2003 - 06/01/2003
- 06/01/2003 - 07/01/2003
- 09/01/2003 - 10/01/2003
- 10/01/2003 - 11/01/2003
- 11/01/2003 - 12/01/2003
- 01/01/2004 - 02/01/2004
- 02/01/2004 - 03/01/2004
- 05/01/2004 - 06/01/2004
- 06/01/2004 - 07/01/2004
- 07/01/2004 - 08/01/2004
- 10/01/2004 - 11/01/2004
- 11/01/2004 - 12/01/2004
- 12/01/2004 - 01/01/2005
Notes on R statistics and programming language
Saturday, March 15, 2003
Trying to speed up the boot on the home XP machine. Ran defragmenter two nights ago and downloaded (from MS) and ran bootvis.exe this morning.
Thursday, March 13, 2003
# Basic RMySQL tasks after connecting (see previous entry)
## List available tables
dbListTables(con)
## get the whole table
dbReadTable(con, "tablename")
## Select from the loaded table: all on one line
dbGetQuery(con, "select row_names, Murder from arrests where Rape > 30 order by Murder")
## Write a table
dbWriteTable(con, "arrests", USArrests, overwrite = TRUE)
## Disconnect
dbDisconnect(con)
## List available tables
dbListTables(con)
## get the whole table
dbReadTable(con, "tablename")
## Select from the loaded table: all on one line
dbGetQuery(con, "select row_names, Murder from arrests where Rape > 30 order by Murder")
## Write a table
dbWriteTable(con, "arrests", USArrests, overwrite = TRUE)
## Disconnect
dbDisconnect(con)
Notes on R - MySQL - and very large regressions.
See < a href="http://www.econ.uiuc.edu/~anovo/LM.html">http://www.econ.uiuc.edu/~anovo/LM.html for some useful notes by Koenker and Novo.
# Put location of libmysqlclient.so in LD_LIBRARY_PATH at R start time:
export LD_LIBRARY_PATH=/usr/local/lib/mysql/
# Here is the working combination for dbConnect
m <- dbDriver("MySQL")
con <- dbConnect(m, user="root" , password="XXXXXX" , host = "thom-80.dhcp.umass.edu" , dbname = "junk")
# Don't forget the period in localhost.
con1 <- dbConnect(m, user="mash" , password="XXXXXX" , host = "localhost." , dbname = "mash")
dbf2mysql is working, see version 1.14
./mysql-downloads/dbf2mysql-1.14/dbf2mysql -h localhost. -d mash -t costat44 -c -P XXXXXX -U mash /mnt/cdrom/data/COSTAT44.DBF
See < a href="http://www.econ.uiuc.edu/~anovo/LM.html">http://www.econ.uiuc.edu/~anovo/LM.html for some useful notes by Koenker and Novo.
# Put location of libmysqlclient.so in LD_LIBRARY_PATH at R start time:
export LD_LIBRARY_PATH=/usr/local/lib/mysql/
# Here is the working combination for dbConnect
m <- dbDriver("MySQL")
con <- dbConnect(m, user="root" , password="XXXXXX" , host = "thom-80.dhcp.umass.edu" , dbname = "junk")
# Don't forget the period in localhost.
con1 <- dbConnect(m, user="mash" , password="XXXXXX" , host = "localhost." , dbname = "mash")
dbf2mysql is working, see version 1.14
./mysql-downloads/dbf2mysql-1.14/dbf2mysql -h localhost. -d mash -t costat44 -c -P XXXXXX -U mash /mnt/cdrom/data/COSTAT44.DBF