similar to: FW: R memory management

Displaying 20 results from an estimated 1100 matches similar to: "FW: R memory management"

2002 Jan 26
1
Trouble with contrasts
Greetings, I have a nagging problem with contrasts and I can't seem to resolve it. A factor exists with four levels (lib1, lib2, con1, con2) and when I check the contrasts or set the contrasts to any of the prespecified ones, I do not get the exact contrasts necessary to test the theoretically relevant ones. I need orthogonal contrasts that look just like this matrix: con1 con2
2007 Dec 18
2
R brakes when submitting a query to MySQL
Hello, I would like to retrieve data stored in MySQL database, so I installed RMySQL package. I can successfully connect with the my database using the following code > dvr<-dbDriver("MySQL") > con2<-dbConnect(dvr,group="exbardiv") > mysqlDescribeConnection(con2) <MySQLConnection:(972,0)> User: mmorag Host: localhost Dbname: exbardiv
2020 Oct 08
0
Lahman Baseball Data Using R DBI Package
Hi Philip, You've probably realized by now that R doesn't like column names that start with a number. If you try to access an R-dataframe column named 2B or 3B with the familiar "$" notation, you'll get an error: > library(DBI) > library(RSQLite) > con2 <- dbConnect(SQLite(), "~/R_Dir/lahmansbaseballdb.sqlite") > Hack12Batting <-
2020 Oct 08
1
Lahman Baseball Data Using R DBI Package
This is really a feature of SQL, not R. SQL requires that you double quote column names that start with numbers, include spaces, etc., or that are SQL key words. E.g., > d <- data.frame(Order=c("sit","stay","heel"), Where=c("here","there","there"), From=c("me","me","you")) >
2006 Nov 17
2
Forming SQL Query at run-time
Hi. I am trying to get data from mysql database using a couple of queries. I do one query to find out the indexes. Then i need to use these indexes in another query, but i keep getting errors. Here is something: numb <- dbSendQuery(con2, "select distinct(comparison) from table1") count <- fetch(numb, -1) my.matrix <- as.matrix(count) rs <- dbSendQuery(con2, "select
2013 Aug 09
1
Agrupar los terminos de la leyenda
Bueno, una pequeña vuelta de tuerca más usando ggplot.. Aunque no quedó tan limpio como el de Carlos (gran resolucion) tambien te sirve. Un saludo library(ggplot2) dec.df <- mat[mat$sol=="dec",] lim.df <- mat[mat$sol=="lim",] dol.df <- mat[mat$sol=="dol",] dec.dr<-qplot(dia,V5,sol,data=dec.df,color=con2,geom=c("line"),facets=.~sol) lim.dr
2009 Jan 28
3
initial value in 'vmmin' is not finite
Dear r helpers I run the following code for nested logit and got a message that Error in optim(c(0, 0, 0, 0, 0.1, -2, -0.2), fr, hessian = TRUE, method = "BFGS") : initial value in 'vmmin' is not finite What does this mean? and how can I correct it? Thank you June > yogurt = read.table("yogurtnp.csv", header=F,sep=",")> attach(yogurt)>
2009 Mar 02
1
initial gradient and vmmin not finite
Dear Rhelpers I have the problem with initial values, could you please tell me how to solve it? Thank you June > p = summary(maxLik(fr,start=c(0,0,0,1,0,-25,-0.2))) Error in maxRoutine(fn = logLik, grad = grad, hess = hess, start = start, : NA in the initial gradient > p = summary(maxLik(fr,start=c(0,0,0,1,0,-25,-0.2),method="BFGS")) Error in optim(start, func, gr =
2011 Aug 08
2
RODBC: sqlUpdate doesn't handle properly POSIXct field?
Hello all! Can someone confirm whether there is a bug or not? I was trying to use sqlUpdate in place of sqlSave as data set I import has duplications. However I get errors while using fast=FALSE argument to safely update/ignore duplicates: Error while executing the query[RODBC] ERROR: Could not SQLExecDirect 'UPDATE "data" SET "logger"=1,
2010 Aug 13
1
decision tree finetune
My decision tree grows only with one split and based on what I see in E-Miner it should split on more variables. How can I adjust splitting criteria in R? Also is there way to indicate that some variables are binary, like variable Info_G is binary so in the results would be nice to see "2) Info_G=0" instead of "2) Info_G<0.5". Thank you in advance! And thanks for Eric who
2001 Jul 30
0
Remote controlling R via sockets
Many thanks to the R core team for their work on R connections. I was delighted to discover that it is now possible to remote-control R-1.3.0 via a socket connection - something which Brian Ripley noted was not yet possible with R-1.2.0 back in January 2001 in the first R News newsletter. How? Just substitute source() for readLines() in last few lines of the example for a socket connection given
2015 Mar 03
0
Feature request: copy attributes in gzcon
The `gzcon` function both modifies and copies a connection object: # compressed text con1 <- url("http://www.stats.ox.ac.uk/pub/datasets/csb/ch12.dat.gz") con2 <- gzcon(con1) # almost indistinguishable con1==con2 identical(summary(con2), summary(con1)) # both support gzip readLines(con1, n = 3) readLines(con2, n = 3) # opening one opens both isOpen(con2)
2020 Oct 03
1
Lahman Baseball Data Using R DBI Package
The double quotes are required by SQL if a name is not of the form letter-followed-by-any-number-of-letters-or-numbers or if the name is a SQL keyword like 'where' or 'select'. If you are doing this from a function, you may as well quote all the names. -Bill On Fri, Oct 2, 2020 at 6:18 PM Philip <herd_dog at cox.net> wrote: > The \?2B\? worked. Have no idea why. Can
2011 Mar 12
3
pass character vector in instrument field of get.hist.quote function
I am new to R so I apologize if my question is trivial. I have not been able to figure out whether what I want to do is even possible. I have a data frame of stock ticker symbols which I store into R space from a txt file as follows: tickers <- read.csv("stocks.txt", header=FALSE, sep=",") tickers <- tickers[1] / the tickers are stored in the first column >
2020 Jun 29
0
A warning in gzcon but not in gzfile
Hi all, I used `gzfile` and `gzcon` to read a compressed file but I found that `gzcon` gave me a different result than `gzfile`. It seems like the `gzcon` does not handle the data correctly. I have posted an example below. In the example, a portion of a compressed file is downloaded from Google Cloud as a raw vector, and the data is saved into a temp file. If I use ` gzfile` to read the file, it
2003 Apr 29
0
calling R from PHP and saving outputs
Hi all, I have to call R from PHP code. I manage to run R and to make it parse my script (see below) but I have an error which I cannot cope with yet while running the PHP page: Error in file("/home/faisnel/Rscripts/testphp2.Rout", open = "wt") : unable to open connection In addition: Warning message: cannot open file `/home/faisnel/Rscripts/testphp2.Rout' Execution
2011 Sep 19
2
text matching
Hi All, I have a character vector by name tickers > head(tickers,10) V1 1 ADARSHPL.BO 2 AGR.V 3 AGU 4 AGU.TO 5 AIMCO.BO 6 ALUFLUOR.BO 7 AMZ.V 8 AVD 9 ANILPROD.BO 10 ARIES.BO I would like to extract all elements that has ".BO" in it. I tried > grep("\.BO",tickers) Error: '\.' is an unrecognized
2011 Dec 07
1
scatterplotting stock returns using quantmod and pairs()
I want to get data for a set of ticker symbols and compute the daily return of the adjusted close using quantmod, and then scatterplot returns using pairs(). The following gets data for the list of tickers: tickers <- c("SHY","TLT","SPY","IWM","GLD","IEV","ILF","EWJ","EPP","SAF","ASA")
2016 Oct 30
0
closeAllConnections() can really mess things up
This is what I get on R 3.3.1 on Linux: > con1 <- textConnection("foo1", open = "w") > print(con1) description class mode text "foo1" "textConnection" "w" "text" opened can read can write "opened"
2009 Feb 03
1
Automatic creation of columns in zoo object
Hello, everyone I have a question. Assume I have the following zoo object: me.la <- structure(c(1524.75, 1554.5, 1532.25, 1587.5, 1575.25, 1535.5, 1550, 1493.5, 1492.5, 1472.25, 1457.5, 1442.75, 1399, 1535.75, 1565.25, 1543.5, 1598.5, 1586.5, 1547, 1561.5, 1504.75, 1503.75, 1483.75, 1468.75, 1453.75, 1410, 1546.75, 1575.25, 1554, 1609, 1597.5, 1558.5, 1573, 1516.25, 1515.5, 1495, 1480, 1465,