The problem is that relatively few DBMSes come even close to conformance
with SQL (and Laurent Valdes did not tell us his DBMS even in his reply).
ANSI SQL says single quotes are used for literals, and double quotes for
identifiers (e.g. table and column names).
Literals are only relevant to
In my attempts to reproduce this both approaches worked.
There seems to be something going on we cannot see (and I don't believe
NULL in the database is being mapped to ). For example, might there be
non-breaking spaces (character A0 in Windows 1252, your most likely
character set) in the
Thank you all for the help . It seems I only need to change the back slash to
forward slash to get things work .
As to using Cygwin as the shell, I couldn't find an instruction dedicated to
Cygwin, should I just follow the Installing
R under Unix-alikes ? Is there an easier way, like making
Thanks Prof Ripley for your answer. In fact, there is no NULL's in these
varchar variables, that is because one of the software's we use do not
accept NULL's (that is strange, isn't it?). So, for instance, when I type
select * from table1
where var1=''
I get all those rows where the cells of
Sergio Della Franca wrote:
Dear R-Helpers,
I have the following data set(y):
Years Products
1 10
2 25
3 40
4 NA
5 35
NA 23
6 NA
7 67
8 NA
I want to create a new column into my dataset(y) under the following
Thanks again,
There is still going on something strange, because na.strings= in sqlQuery
clause didn't help. I'm helpless but thanks anyway...
-Lauri
2007/4/3, Prof Brian Ripley [EMAIL PROTECTED]:
On Tue, 3 Apr 2007, Lauri Nikkinen wrote:
Thanks Prof Ripley for your answer. In fact, there
Hello,
For verbose coding I'd like to do something like:
myfunction - function(x){
if (a){
stop(paste(myfunction_name_here,requires xyz!)
}
Is that possible?
Thanks for any hints, Joh
__
R-help@stat.math.ethz.ch
When using GAM function in R, we need to specify the degree of freedom
for the smooth function (i.e. s=(x, df=#)). I am wondering how to choose an
appropriate df.
--- you could use the gam function in package mgcv. It will select the
effective degrees of freedom for you automatically using
projection83 wrote:
My R code has got too complex to have a non-modular approach. Ive done some
coding in other languages before, but I somehow cant figure out R's general
rules for global and local variables. I have put a simple code below, if
anyone can show me what i need to add to make
On Tue, 3 Apr 2007, Lauri Nikkinen wrote:
Thanks Prof Ripley for your answer. In fact, there is no NULL's in these
varchar variables, that is because one of the software's we use do not
accept NULL's (that is strange, isn't it?).
It's not uncommon. (Be grateful you are not on MacOS, where it
I have much more problem in the following case:
Years Products New Column
1 10 0
2 25 0
3 40 0
4 NA 0
5 35 0
NA23 1
6 NA 0
7 670
8
Lauri Nikkinen wrote:
Thanks Prof Ripley for your answer. In fact, there is no NULL's in these
varchar variables, that is because one of the software's we use do not
accept NULL's (that is strange, isn't it?). So, for instance, when I type
select * from table1
where var1=''
I get all
I have estimated a multiple nonparametric regression using the loess
command in R. I have also estimated an additive version of the model using
the gam function. Is there a way of using the output of these two models to
test the restrictions imposed by the additive model?
Hello,
I have a list with n numerical components of different length (3, 4 or 5
values in each component of the list); I need to export this as a text
file where each component of the list will be a row and where missing
values should fill in the blanks due to the different lengths of the
You can use the LRT (although I think that it assumes the df to be
fixed). For instance the package mgcv by Simon Wood has an anova method
to compare models fitted by the relevant gam() function, and the
print.summary() itself returns such information..
best,
vito
set.seed(123)
n-100
sig-2
x0
On Mon, 2 Apr 2007 22:26:06 -0400, eric lee wrote:
EL Hi. I'm trying to take a data set with two independent and one dependent
EL variable and enter a x,y value to predict the dependent with a
EL nonparametric technique. I've been using interpp in the akima package,
EL (windows xp, R 2.4.1),
On Tue, 3 Apr 2007 11:43:55 +0200, Adelchi Azzalini wrote:
AA On Mon, 2 Apr 2007 22:26:06 -0400, eric lee wrote:
AA
AA EL Hi. I'm trying to take a data set with two independent and one
AA EL dependent variable and enter a x,y value to predict the dependent
AA EL with a nonparametric technique.
Dear list members,
I want to use a GLM with an unbalanced factor and continuous variables.
My factor F has 12 unbalanced levels:
F=as.factor(c('A','B','C','C','C','C','D','D','D','D','D','D','E','E','E','E','E','E','F','G','G','H','I','I','J','J','J','K','L','L','L'))
summary(F)
A B C D E F G H
Sergio Della Franca wrote:
I have much more problem in the following case:
Years Products New Column
1 10 0
2 25 0
3 40 0
4 NA 0
5 35 0
NA23 1
6 NA 0
Hi
do.call(cbind, your.list) # or rbind
gives you rectangular matrix, however shorter items in list are recycled
as necessary. Problem is that you need to specify how shall be shorter
items handeled as it is not obvious. One possibility could be add NAs to
positions where you want them, what
Ok,
this procedure, ifelse( is.na(year) !is.na(products) products20,1,0)
, run correctly.
Thank you very much.
Best.
2007/4/3, Mark Wardle [EMAIL PROTECTED]:
Sergio Della Franca wrote:
I have much more problem in the following case:
Years Products New Column
1 10
Hello,
In my study, mixed effects model is required and the number of fixed
effects is very large. When lme package is employed, a model error is
displayed once the number of fixed factors in the formula reaches 200. Is
this the maximum number of fixed factors can be handled by lme package?
If
Biscarini, Filippo wrote:
Dear Mark,
If you have time you can try directly into R this excerpt from my list.
This is horrible code, and I should be shot! I would appreciate any
better ways of doing this, but I think this works!
l = list(c(1,2,4),c(4,5,2,1),c(3,4,6,3),c(3,1,76,4,2))
I dunno much about such things, but a wee experiment seems to
indicate that the following structure does what you want:
myfunction - function(x){
nm - as.character(match.call())[1]
a - TRUE
if (a){
Try this:
myfunction - function(){
+ # some calculations
+ # now get my name
+ .caller - sys.call()
+ cat(paste(as.character(.caller[[length(.caller)]]),needs 'xyz'\n))
+ }
myfunction()
myfunction needs 'xyz'
On 4/3/07, Johannes Graumann [EMAIL PROTECTED] wrote:
Hello,
try something like this:
lis - list(c(1,2,4), c(4,5,2,1), c(3,4,6,3), c(3,1,76,4,2))
##
n.max - max(sapply(lis, length))
val - NA # what to fill in
fill - function(x) c(x, rep(val, n.max - length(x)))
as.data.frame(do.call(rbind, lapply(lis, fill)))
I hope it helps.
Best,
Dimitris
Hi All
How can I specify which category R should omit when running a linear model with
categorical predictors? I saw it omits the first category by default, but I
like
to have the 3rd category omitted.
Thanks for your hints.
Toby
__
Dear R members:
Sorry, this question is not tightly related to R software, but I
usually use R to do this type thing. So please if you can help me out!
I want to predict a protein function, by through sequence alignment, I
get several low identity sequences(say 100) in several
You can concatenate a series of NA's to match the length of your longest
element.
(1) exampDat is example data
(2) max(rapply(exampDat,length)) is length of longest element
(3) function(x,m) will do the concatenation
(4) sapply() will return each list element as a column of a data frame
(5) t()
Hi,
I am a bit surprised how approx resolves ties when ties = 'ordered'. In the
following two examples I'd expect the first expression to return 1 (not 2).
The documentation reads that that 'f=0' is right-continuous and 'f=1' is
left-continuous so one would expect the argument to matter when
This presumes a function is always called by name. Try
lapply(1:10, myfunction)
Error in FUN(c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)[[1]], ...) :
FUN requires xyz!
to see a (simple case of) the problem.
On Tue, 3 Apr 2007, [EMAIL PROTECTED] wrote:
I dunno much about such things, but a wee
hello
how can I confine a dataframe with a known polygon that is part of whole
data ?
regards
--
Ahmet Temiz
--
This message has been scanned for viruses and\ dangerous con...{{dropped}}
__
R-help@stat.math.ethz.ch mailing list
model.matrix() does this following the instructions you give it
(ultimately via options(contrasts) about how to encode a factor variable
(and this is also nothing to do with 'factor()', and factors have 'levels'
not 'categories', a completely different concept in S but not used
nowadays in R).
Sorry for possible cross posting but it seems that my previous message was send
as HTML and then scrubbed.
Dear list members,
I want to use a GLM with an unbalanced factor and continuous variables.
My factor F has 12 unbalanced levels:
On 4/2/2007 10:07 PM, Kyle Edwards wrote:
Greetings all,
I'm a newcomer to Bayesian stats, and I'm trying to calculate the
Deviance Information Criterion by hand from some MCMC output.
However, having consulted several sources, I am left confused as to
the exact terms to use. The most
Guillaume Brutel wrote:
Sorry for possible cross posting but it seems that my previous message was
send as HTML and then scrubbed.
Dear list members,
I want to use a GLM with an unbalanced factor and continuous variables.
My factor F has 12 unbalanced levels:
Hi list,
I have some anova issues...
I have a dataset comprised of two factor values and a dependent value.
The factors are patchiness and within patchiness I have 4 treatments.
So factor treatment is nested within factor patchiness. The dependent variable
is a lenght.
If I'm not mistaken my
In fact I want to test for the effects of multiple continuous and
categorical variables (with GLMs) which are nested in the factor levels
on a single continuous variable. Since the design is unbalanced, I
though I had to specify it in the glm formula.
Guillaume Brutel wrote:
Sorry for
Jim Holtman wrote:
myfunction - function(){
+ # some calculations
+ # now get my name
+ .caller - sys.call()
+ cat(paste(as.character(.caller[[length(.caller)]]),needs
'xyz'\n)) + }
myfunction()
myfunction needs 'xyz'
I like this! It's even possible to know _which_
Hello fellow R people,
I don't understand the default behavior of the axis labeling when
plotting dates.
I would expect something like 2001, 2002 or possibly Jan 01, Jan
02...Jan 06, but instead I only see Jan 01, Jan 01, Jan 01
See the following example
startdate -
Alberto Monteiro wrote:
Jim Holtman wrote:
myfunction - function(){
+ # some calculations
+ # now get my name
+ .caller - sys.call()
+ cat(paste(as.character(.caller[[length(.caller)]]),needs
'xyz'\n)) + }
myfunction()
myfunction needs 'xyz'
I like this! It's even
What version of R are you using? When I copy and paste that into
R 2.4.1 on Windows XP I get 2001, 2002, ..., 2007
On 4/3/07, Henrik Andersson [EMAIL PROTECTED] wrote:
Hello fellow R people,
I don't understand the default behavior of the axis labeling when
plotting dates.
I would expect
Hmm,
I'm running 2.4.0 under linux
sessionInfo()
R version 2.4.0 (2006-10-03)
i686-pc-linux-gnu
locale:
C
attached base packages:
[1] methods stats graphics grDevices utils datasets
[7] base
++
pdf(strange.pdf)
startdate -
PLEASE do read the posting guide and give us the ouput it asks for.
Current R (2.5.0 alpha) does give 2001, 2002, ..., so you did not follow
the request to update your R, I suspect.
On Tue, 3 Apr 2007, Henrik Andersson wrote:
Hello fellow R people,
I don't understand the default behavior of
On Mon, 2 Apr 2007, [EMAIL PROTECTED] wrote:
From the above, the marginal totals for his 2x2 table
a b = 168
c d 15 24
are (rows then columns) 24,39,31,32
These fixed marginals mean that the whole table is determined
by the value of a. The following function P.FX()
Hello,
in a three dimensional coordinate system, I'd like to find all my
experimental data points that fall within an ellipsoid around a fixed
coordinate. The fixed point is defined by (x.coord.point,
y.coord.point, z.coord.point). The coordinates of the ellipsoid are
given by the three
On Tue, 3 Apr 2007, temiz wrote:
hello
how can I confine a dataframe with a known polygon that is part of whole
data ?
Could I suggest following up this question on the R-sig-geo list? It is
not clear what you want to do - are the rows in the data frame points
which may lie inside or
Here is one way to do it:
# create the initial x variable
x1 - rnorm(100, 15, 5)
# x2, x3, and x4 in a matrix, these will be modified to meet the
criteria
x234 - scale(matrix( rnorm(300), ncol=3 ))
# put all into 1 matrix for simplicity
x1234 - cbind(scale(x1),x234)
# find the current
I don't understand how the x,y,z vectors define the ellipsoid, but one
approach would be:
Find a 3x3 matrix that represents the ellipsoid as a variance matrix
(some of the code in the ellipse package may be informative for this).
Subtract x.coord.point, y.coord.point, and z.coord.point from your
Thomas Lumley wrote:
On Mon, 2 Apr 2007, [EMAIL PROTECTED] wrote:
From the above, the marginal totals for his 2x2 table
a b = 168
c d 15 24
are (rows then columns) 24,39,31,32
These fixed marginals mean that the whole table is determined
by the value of
Wott about this then?
myfunction - function(x){
temp - sys.calls()[[1]]
nm - temp[length(temp)]
a - TRUE
if (a){
stop(paste(nm,requires xyz!))
}
}
myfunction()
Error in myfunction() : myfunction requires xyz!
lapply(1:10,myfunction)
Hi, Anybody used treenet here? I downloaded a demo but don't know how to
start with. Does R has something like treenet? Thanks,
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch mailing list
Dear Vito,
Thank you for your prompt reply. Perhaps I am missing something but as
I understand it the procedure you suggest would allow me to test for
nonlinearities in one of the control variables. However my objective
is to nonparametrically test whether the nature of the
On 4/3/07, Fang, Yongxiang [EMAIL PROTECTED] wrote:
In my study, mixed effects model is required and the number of fixed
effects is very large. When lme package is employed, a model error is
displayed once the number of fixed factors in the formula reaches 200. Is
this the maximum number of
On 4/2/07, Seyed Reza Jafarzadeh [EMAIL PROTECTED] wrote:
Hi,
I am getting a warning message when I am fitting a generalized linear
mixed model (m1.2 below).
CHOLMOD warning: matrix not positive definite
Error in objective(.par, ...) : Cholmod error `matrix not positive
definite' at
Guillaume Brutel wrote:
In fact I want to test for the effects of multiple continuous and
categorical variables (with GLMs) which are nested in the factor levels
on a single continuous variable. Since the design is unbalanced, I
though I had to specify it in the glm formula.
That
Hi
When using linear mixed model, I could test for the effect of the random
part of the model using a likelihood ratio test comparing two model with and
without the random part.
model.lmer=lmer(y~x+(1|r))
model.lm = lm(y~x)
anova(model.lmer,model.lm)
However, this does not work with a mixed
gbm package if I am right.
On 4/3/07, HelponR [EMAIL PROTECTED] wrote:
Hi, Anybody used treenet here? I downloaded a demo but don't know how to
start with. Does R has something like treenet? Thanks,
[[alternative HTML version deleted]]
__
Hi all!
I want to fit a time series with 17376 values by using the arima() function.
If I extract the residuals from the fitted model there are values for the
residuals 1 to 710 but the residuals 711 to 17376 have the value NA.
Does anybody know what the problem could be? Is the function arima()
Dear Douglas Bates,
Thanks for your attention. Please see the warnings with additional
control argument for the models that failed.
m1.2 - lmer(o ~ pv1o + pv2o + pv1toa + pv2toa + sesblf + (pv1o | prov) + (1
| pm), data = mydata[1:1392,], family = quasipoisson, control =
list(msVerbose =
Dear Greg,
Thanks million!
As good as it gets :)
All the best
Nguyen
-Original Message-
From: Greg Snow [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 04, 2007 1:46 AM
To: Nguyen Dinh Nguyen; r-help@stat.math.ethz.ch
Subject: RE: [R] Generate a serie of new vars that correlate with
Dear all,
I would need to maximize a self-defined 'target' function(see below) with
respect to theta, where v follows a log-normal distribution with mean 'mu(x)'
and a constant variance. For each v drawn from its distribution, one maximized
value and optimal theta are produced. I'd like
I want to use the replace function on R_Jeter_04_post (see attached)
so that S=1, D=1, T=1, HR=1, O=0, K=0, E=0, FC=0, and W,IW,and HP are
removed, so that i have a simple list of 1's and 0's.
I understand that I need to use the command replace(x,list,values)
and rm() but I'm having trouble
Thank you,
I will give this a good think
Mark Wardle wrote:
projection83 wrote:
My R code has got too complex to have a non-modular approach. Ive done
some
coding in other languages before, but I somehow cant figure out R's
general
rules for global and local variables. I have put a
I dont know if thats what i want (its not working like i want). I would like
to have R pause, wait for a user input of a number, then store that number
as a variable to use in the next calculation it does...
Or should the below do that?
jim holtman wrote:
what you want is:
I am used to java (well, i dont remember it really well, but anyway)
I have having a really difficult time making simple loops to work. I got the
following to work:
##
##Creates objects Ux1, Ux2, Ux2 etc. that all contain n numbers in a
random distribution
##
Dear all,
Recently, I installed the KDE desktop under my Linux system, but Included
also the Gnome desktop (actually, I installed everything that comes in the
openSUSE cd).
My question about R is the following. I would like to run some kind of
console under Linux. I was reading and first I found
Hi,
I am providing more examples where HPDinterval failed. It seems to be
working OK for (generalized linear mixed) models without crossed
random-effects (m1.17, m1.18, m1.19, m1.20, m1.21, m1.22, and m1.24
below).
Thank you,
Reza
m1.1 - lmer(o ~ pv1o + pv2o + pv1toa + pv2toa + sesblf + (1 |
On Tue, 03-Apr-2007 at 01:55PM +0200, Dimitris Rizopoulos wrote:
| try something like this:
|
| lis - list(c(1,2,4), c(4,5,2,1), c(3,4,6,3), c(3,1,76,4,2))
| ##
| n.max - max(sapply(lis, length))
| val - NA # what to fill in
| fill - function(x) c(x, rep(val, n.max - length(x)))
|
Folks,
I'm having trouble with how datetime objects with time zones are set
and plotted. This may be the result of my running R (2.4.0) on a
Windoze XP box. Perhaps not. Here are two example problems I need
advise on if you have time:
1) I collect data with dates (often as a fractional
???
The code below is correct and does exactly what you described - just
check the value of ANSWER. R is paused and the user-specified valued is
assigned to ANSWER when you call your function, not inside. In your
former code ANSWER was a local variable which 'died' when your function
finished.
Not sure whether this is exactly and everything you want, but at least
it may give you some ideas how to proceed. You do not need loops at all:
Let's try a simplified example with 3 samples, each of length 10 (just
for printing purposes):
m - c(1,2,3)
v - c(1,4,9)
n - 10
means - rep(m,each=n)
On Wed, 4 Apr 2007, Luis Lopez Oliveros wrote:
Dear all,
Recently, I installed the KDE desktop under my Linux system, but Included
also the Gnome desktop (actually, I installed everything that comes in the
openSUSE cd).
My question about R is the following. I would like to run some kind of
73 matches
Mail list logo