Displaying 20 results from an estimated 500 matches similar to: "[Fwd: Re: question on sqldf syntax]"
2009 Apr 27
0
VIF's in R using BIGLM
Dear R-help
This is a follow-up to my previous post here:
http://groups.google.com/group/r-help-archive/browse_thread/thread/d9b6f87ce06a9fb7/e9be30a4688f239c?lnk=gst&q=dobomode#e9be30a4688f239c
I am working on developing an open-source automated system for running
batch-regressions on very large datasets. In my previous post, I posed
the question of obtaining VIF's from the output of
2013 Apr 12
3
Why copying columns of a data.frame becomes numeric?
Dear list,
I want the 1st, 2nd, 5th, and 6th columns of mtcars. After copying them,
the columns become numeric class rather than data frame.
But, when I copy rows, they data frame retains its class. Why is this? I
don't see why copying rows vs columns is so different.
> class(mtcars)
[1] "data.frame"
> head(mtcars)
mpg cyl disp hp drat wt qsec vs
2010 Nov 01
1
sqldf error only on Unix not Windows
Hello Group,
I am having trouble with the sqldf package on unix. The same code works fine on windows.
Silly Example script:
# Load the package
library(sqldf)
# Use the titanic data set
data(women)
colnames(women)
head(women)
sqldf('select height, count(*) from women where height is not null group by weight')
Unix Output and error:
bash-3.00$ R --vanilla <testR.R
2013 Apr 16
2
efficiently diff two data frames
Dear all,
What is the quickest and most efficient way to diff two data frames,
so as to obtain a vector of indices (or logical) for rows/columns that
differ in the two data frames? For example,
> Xe <- head(mtcars)
> Xf <- head(mtcars)
> Xf[2:4,3:5] <- 55
> all.equal(Xe, Xf)
[1] "Component 3: Mean relative difference: 0.6863118"
[2] "Component 4: Mean relative
2007 May 12
2
Implicit vs explicit printing and the call stack
Hi everyone,
I've run into a bit of strange problem with implicit vs explicit
printing and the call stack. I've included an example at the bottom of
this email. The basic problem is that I have an S3 object with a
print method. When the object is implicitly printed (ie. typed
directly into the console) the function arguments in the call stack
are exploded out to their actual values,
2009 May 16
1
Fwd: Cannot allocate a new database connection error
---------- Forwarded message ----------
From: Moumita Das <das.moumita.online@gmail.com>
Date: Sat, May 16, 2009 at 2:26 PM
Subject: Cannot allocate a new database connection error
To: r-help-request@r-project.org
Hi friends,
why do i keep getting this error?The program runs, twice and every third
time i get this error.I have to quit.Again get teh R-prompt and then run the
script.
*Error
2009 Jan 11
1
Boxplot from matrices
Hii,
I will create boxplots from matrices. I have the following data sets:
5.0 1.78 2.99 2.019 0
10.0 1.79 3.00 1.744 0
15.0 1.78 2.98 1.936 0
20.0 1.78 2.99 1.975 0
25.0 1.73 2.91 3.591 0
30.0 1.79 3.00 1.966 0
35.0 1.79 3.00 2.451 0
40.0 1.79 3.00
2007 Jun 05
3
read table
Hi,
I'm a novice of R.
I want to read the following table into R:
names mpg cyl disp hp drat
Mazda RX4 21.0 6 160.0 110 3.90
Mazda RX4 Wag 21.0 6 160.0 110 3.90
The command I used is:
> test <- read.table(file.choose(),header=T)
The result is:
Error in read.table(file.choose(), header = T) :
more columns than column names
2016 Apr 14
0
Bug in by() function which works for some FUN argument and does not work for others
I think you are not using the best function for what your intentions are.
Try:
> by(data=mtcars, INDICES=list(as.factor(mtcars$am)), FUN=colMeans)
: 0
mpg cyl disp hp drat wt
qsec vs
17.1473684 6.9473684 290.3789474 160.2631579 3.2863158 3.7688947
18.1831579 0.3684211
am gear carb
0.0000000
2016 Apr 14
4
Bug in by() function which works for some FUN argument and does not work for others
Dear Sirs,
I am Professor at Indira Gandhi Krishi Vishwavidyalaya, Raipur,
Chhattisgarh, India.
While taking classes, I found the *by() *function producing following error
when I use FUN=mean or median and some other functions, however,
FUN=summary works.
Given below is the output of the example I used on a built-in dataset
"mtcars", along with error message reproduced herewith:
>
2012 Feb 02
9
sqldf for Very Large Tab Delimited Files
Hi All,
I have a very (very) large tab-delimited text file without headers. There
are only 8 columns and millions of rows. I want to make numerous pieces of
this file by sub-setting it for individual stations. Station is given as in
the first column. I am trying to learn and use sqldf package for this but am
stuck in a couple of places.
To simulate my requirement, I have taken iris dataset as an
2016 Apr 15
0
Bug in by() function which works for some FUN argument and does not work for others
> On Apr 15, 2016, at 1:16 AM, Akhilesh Singh <akhileshsingh.igkv at gmail.com> wrote:
>
> Dear All,
>
> Thanks for your help. However, I would like to draw your attention to the
> following:
>
> Actually, I was replicating the Example 2.3, using the dataset
> "brainsize.txt" given in Section 2.3.3 ("Summarize by group") at page 55,
> of a
2016 Apr 17
0
Bug in by() function which works for some FUN argument and does not work for others
> On Apr 16, 2016, at 2:03 AM, Akhilesh Singh <akhileshsingh.igkv at gmail.com> wrote:
>
> Dear All,
>
> I have got your core message, that it is my responsibility to determine whether any particular function in my version of R satisfies the language requirements at the time of your use. Jim Albert and Maria Rizzo must have used their code, which was permitted in the R-code
2016 Apr 15
4
Bug in by() function which works for some FUN argument and does not work for others
Dear All,
Thanks for your help. However, I would like to draw your attention to the
following:
Actually, I was replicating the Example 2.3, using the dataset
"brainsize.txt" given in Section 2.3.3 ("Summarize by group") at page 55,
of a famous book "R by Example" written by "Jim Albert and Maria Rizzo"
published in Springers (2012) in a Use R! Series. The
2016 Apr 16
2
Bug in by() function which works for some FUN argument and does not work for others
Dear All,
I have got your core message, that it is my responsibility to determine
whether any particular function in my version of R satisfies the language
requirements at the time of your use. Jim Albert and Maria Rizzo must have
used their code, which was permitted in the R-code of their time (2012).
Therefore, I have now modified my R-code, as per R-3..2.4 version,
according to my requirement
2013 Apr 25
0
tables: proper use of Hline() in tabular()
Dear all,
I am unable to understand how Hline() works in tabular(). I've read
the vignette and the help page, and here this example compiles
perfectly fine:
latex( tabular( Species + Hline() + 1
~ Heading()*mean*All(iris), data=iris) )
However, if I try it on my own data it fails. Consider this:
set.seed(1)
Xa <- data.frame(p=rep(c("First group","Second
2009 Dec 07
2
data.frame to "stacked frame"
Hi,
have anybody a hint how i could avoid the cumbersome way (..especially
the value part)
change the data representation from n column data.frame to an stacked
representation.
many thanks
Christian
#example data
dfw <- as.data.frame(matrix(runif(10*10),ncol=10))
dfw$group <- sample(c("X","Z"),nrow(dfw),replace=T,prob=c(0.75,0.25))
# change
var <-
2005 Jan 29
2
Database Connection Problem with RMySQL package
Folks,
I failed to create a connection to the database under MySQL DBMS in
the R system via RMySQL's method dbConnection(...).
My setup is as follows:
Microsoft Windows XP 5.1.2600
MySQL 4.1.9
R 2.0.1
DBI 0.1-8
RMySQL 0.5-5
Both of DBI and RMySQL packages were downloaded from bell lab:
http://stat.bell-labs.com/RS-DBI/download/index.html
My case in R is as follows:
> library(DBI)
2006 Mar 06
3
Disconnect all MySQL connections
Hi
I've got the error "cannot allocate a new connection -- maximum of 16 connections
already opened" after I tried to create a new connection to a database. However,
the reason ist, that i did not disconnect previous connections....
I don't know the name of this connections. How can I disconnect this "unknown"
connections and drivers? if I delete all objects, the
2009 Jan 13
0
crash on multiple queries to postgresql db [solved]
On Mon, Jan 12, 2009 at 6:31 PM, Martin Morgan <mtmorgan at fhcrc.org> wrote:
> An off-list guess is, ironically, to NOT call dbDisconnect or gc().
>
> The C code in the package registers a 'finalizer' that gets called when the
> object is garbage collected. This is the same code that gets called by
> dbDisconnect. Unfortunately, the code does not check to see if