[R] RODBC problem
Wayne.W.Jones at shell.com
Wayne.W.Jones at shell.com
Wed Sep 26 13:16:38 CEST 2007
Not sure which of the questions yo want answered in your email.
However, if its the one regarding the boxplot try:
dd <- read.table("test.txt",header=T)
attach(dd)
boxplot(x)
outlier <- function(y){
out <- boxplot(y, range = 1)$out
outliers <- which(y %in% out)
return(list(out=out,outliers=outliers))
}
outlier(x)
-----Original Message-----
From: r-help-bounces at r-project.org
[mailto:r-help-bounces at r-project.org]On Behalf Of amor Gandhi
Sent: 26 September 2007 11:45
To: DUPREZ Cédric; Bernhard "Wellhöfer
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] RODBC problem
Hello,
I wrote
> setwd("D:/")
> dd <- read.table(file="test.txt",header=TRUE)
> attach(dd)
> boxplot(x)
> outlier <- function(y){
+ out <- boxplot(y, range = 1)$out
+ outliers <- which(y == out)
+ dev.off()
+ return(out,outliers)
+ }
> outlier(x)
$out
[1] 1.950208 2.082025 4.768637 4.800333 5.529516 1.657321 4.656504 2.138956
[9] 4.437906 4.716786
$outliers
[1] 23
Warning messages:
Could you tell me please why do I have Warning messages and why I do not get all the id for the outliers in out, but only for the id=23? Thank you very much in advance!
Amor
DUPREZ Cédric <cedric.duprez at ifn.fr> schrieb:
Hello,
The problem seems to be in the query syntax.
Can you show us the query you are trying to perform ?
Regards,
Cedric
-----Message d'origine-----
De : r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] De la part de Bernhard Wellhöfer
Envoyé : vendredi 6 juillet 2007 11:45
À : r-help at stat.math.ethz.ch
Objet : [R] RODBC problem
Hello,
I use a RODBC connection to a MySQL server on a Debian machine. The call to odbcConnect() seems to be ok, but the result of the first sqlFetch(channel,"t_studie") retrieves this data frame:
[1] "[RODBC] ERROR: Could not SQLExecDirect"
[2] "42000 1064 [MySQL][ODBC 3.51 Driver][mysqld-5.0.22-Debian_1bpo1-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\"t_studi(\004"
Please note the funny character at the end of the table name in the error message.
The "Test Data Source" option on the ODBC Data Source Name configuration panel report success.
Who can help me here?
Regards,
Bernhard
[[alternative HTML version deleted]]
______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list