Displaying 20 results from an estimated 1000 matches similar to: "RODBC sqlFetch"
2001 Sep 25
2
glm.nb, anova.negbin
Dear R-collegues,
I'm getting an error message (Error in round) when summarising a glm.nb
model, and when using anova.negbin (in R 1.3.1 for windows):
> m.nb <- glm.nb(tax ~ areal)
> m.bn
Call: glm.nb(formula = tax ~ areal, init.theta = 5.08829537115498,
link = log)
Coefficients:
(Intercept) areal
3.03146 0.03182
Degrees of Freedom: 283 Total (i.e. Null); 282
2001 Dec 18
4
chi-squared test
I don't quite understand the difference between the two methods for
performing a chi-squared test on contingency tables: summary(table())
and chisq.test()
They may different results. E.g.:
aa <- gl(2, 10)
bb <- as.factor(c(1,2,2,2,1,2,1,2,2,2,1,2,2,2,1,1,1,2,1,1))
aa <- c(aa, aa)
bb <- c(bb, bb)
table(aa, bb)
summary(table(aa, bb))
chisq.test(aa, bb)
Could somebody give me
2003 Apr 24
1
matrix to coordinates
Dear R-users,
I'm sure it must be a specific function or a better way to convert
matrix to x,y,z coordinates (and viceversa), than my function below (it
works). Any help?
m2coord <- function(m)
{
k <- nrow(m)*ncol(m)
aa <- data.frame(r=1:k, c=1:k, v=1:k)
k <- 0
for (i in 1:nrow(m))
for (j in 1:ncol(m))
{
k <- k+1
aa$f[k]=i; aa$c[k]=j; aa$v[k]=m[i,j]
}
aa
}
Juli
2003 Dec 18
2
barplot & plot together
Dear colleges,
I'm trying to combine a barplot and a plot in a single figure as follows:
data <- 1:6
t <- barplot(data, axes=F)
par(new= T)
plot(t, data, type="b")
However, as you can see in the example, the dots of the second plot do
not fall in the midpoint of the bars in the first. Any trick for setting
the 2 plots at the same scale?
I have unsuccessfully tried:
plot(t,
2001 Sep 11
2
AIC
Dear R collegues,
I'm trying to understand what's AIC in R (ver. 1.3.1), and I'm getting a
different answer if I look at the AIC(of the fitted model) or the aic in
the summary( of the fitted model). Is this correct? Can somebody explain
me the difference between the two values? or Is the AIC criterion not
appropiated for Poisson models?
R session:
> t1 <- glm(tax ~ areal,
2001 Sep 11
2
AIC
Dear R collegues,
I'm trying to understand what's AIC in R (ver. 1.3.1), and I'm getting a
different answer if I look at the AIC(of the fitted model) or the aic in
the summary( of the fitted model). Is this correct? Can somebody explain
me the difference between the two values? or Is the AIC criterion not
appropiated for Poisson models?
R session:
> t1 <- glm(tax ~ areal,
2002 Jan 08
6
Subsets without NA
Is there a way of removing all rows with missing values from a data frame?
I usually use
subset(x, var1!="NA")
and repeat for each variable. It would be nice to be able to do it in one
fell swoop. Also, surprisingly, it doesn't always work. Sometimes I'm left
with an empty set even though not all rows have missing values for the
variable.
Cheers,
mikkel
Mikkel Grum,
2000 Mar 16
2
glm: offset in poisson
R-users,
Can an offset term be included in a Poisson model?
I get an error message when trying that:
>r3o <- glm(tax ~ areal + offset(o), family=poisson)
Error in (if (is.empty.model(mt)) glm.fit.null else glm.fit)(x = X, y = Y, :
inner loop 1; can't correct step size
In addition: Warning message:
Step size truncated due to divergence in: (if (is.empty.model(mt))
2002 May 10
2
RODBC for importing dbf
Hi
I know that it is very easy to import data from a dbf file to R, by
saving the data as csv, for instance.
However, I have several hundreds of files to do that. So, I thought of
using RODBC to read the dbf files and save it as data.frame. However, I
cannot even start (this is my first time using such package):
> library(RODBC)
> bdades <- odbcConnect("prova.DBF")
Warning
2007 Apr 25
1
Help with saptial analysis (cluster)
Hi R-users
I'm a beginner with R and statistics, so I need some help to start my data
analysis. I've been reading some docs and tutorials on R and cluster analysis.
I've got a large dataset (102000 points) with values of longitude, latitude and
temperature and want to see if I can find groups (clusters).
Following some tutorials I can look for principal components but get an error
2010 Jun 14
1
Install Rmpi
Hi everyone
As I couldn't succeed with manual installation of Rmpi I decided to
start again from the beginning. I removed R and MPICH in my Ubuntu Hardy
installation. Then, to avoid any dependencies problems I have installed
MPICH and R from synaptic, not from sources. But now I can't install Rmpi.
An error message appears when trying to install Rmpi, you can find in
2011 Jun 03
1
R and DBSCAN
Hello everyone,
When looking for information about clustering of spatial data in R I was
directed towards DBSCAN. I've read some docs about it and theb new
questions have arisen.
DBSCAN requires some parameters, one of them is "distance". As my data
are three dimensional, longitude, latitude and temperature, which
"distance" should I use? which dimension is related to
2011 Mar 04
1
Time series analysis for a daily series
Hi everyone
I am trying to do some time series analysis with daily temperature data
(40 years). I have created a zoo object and ts object but can't apply
stl function. It says the series is not periodic or has less than two
periods. I've searched through google and found a lot of messages about
this problem but not a solution/example to look for trend and seasonal
component of a
2008 Jun 23
2
Handle missing values
Hi everyone
I am new to R and have a question about missing values. I am trying to
do a cluster analysis of monthly temperatures and my data are 14 columns
with spatial coordinates (lat,lon) and 12 monthly values:
/lat - lon - temp1 - //temp2 - temp3 - .... - //temp12/
If I omit missing values (my missing values are 99.00) with
/mydata <- na.omit(mydata)/
every row with a
2002 Aug 28
1
RODBC: sqlFetch and its argument sqtable
Calling function "sqlFetch" in library(RODBC) and specifying a character
string as 2nd argument, I get an error I don't understand:
library(RODBC)
channel <- odbcConnect("mydatabase.mdb", case="msaccess")
sqlFetch(channel, "mytable")
# this works fine
tabname <- "mytable"; sqlFetch(channel, tabname)
# this gives an error:
# Error in
2011 Jul 13
7
Extraer datos mensuales de una serie temporal
Hola a todos
Estoy intentando extraer un subconjunto de datos de una serie temporal,
concretamente quiero extraer los meses de verano de varios años pero no
encuentro la manera. Los datos tienen este formato:
FECHA;H_SOLAR;DIR_M;DIR_S;VEL_M;VEL_S;VEL_X;U;V;TEMP_M;HR;BAT;PRECIP;RAD;UVA;UVB;FOG;GRID;
2005 Oct 10
3
sqlFetch on MySQL-DB
Dear all,
I successfully set up a local MySQL-database. Connecting via RODBC is
not problem, the same in fetching 3 of 4 tables. But trying to
connect to table 4 fails.
> author<-sqlFetch(test,"author")
Error in fromchar(unclass(x)) : character string is not in a standard
unambiguous format
In principle I understand that error message, but I don't know any
solution.
2004 Nov 09
1
colnames argument in sqlFetch backwards? (PR#7355)
Full_Name: Bert Gunter
Version: 2.0.0 patched
OS: Win2000
Submission from: (NULL) (192.12.78.250)
The TRUE/FALSE options of the colnames argument in sqlFetch (RODBC) seem to be
reversed, at least for .xls files.
## z is a connection to an xls workbook opened by odbcConnectExcel()
> dat<-sqlFetch(z,'SuccessRates',colnames=FALSE)
> dat[1:5,]
RecID Name Run Grams Lost Run
2011 Feb 17
2
Regresión lineal para una serie temporal
Hola a todos
Estoy intentando hacer un análisis rápido de una serie temporal de datos
diarios pero me encuentro con algunos problemas. Me gustaría en primera
instancia hacer una regresión lineal pero no encuentro la forma.
Tras leer los datos diarios creo un objeto de la clase zoo y sobre éste
no puedo utilizar lm(). He leído algo sobre dynlm pero no encuentro la
forma.
Se agradece
2007 Jan 16
1
RODBC: sqlQuery is successful, but a similar sqlFetch returns error
Greetings guRus --
I have successfully queried a large (24,445 rows by 281 cols.) in-house
database using the following RODBC query (without the line breaks)
testout <- sqlQuery(channel, "select idSchedule,EXCL_Total from
dbo.vwC1198_2006_RawData_With_CMPL_EXCL")
This returns a dataframe of 24445 rows and two columns (as intended),
but the following command
testout