Hello everybody,
i have the following problem to write a function which recognizes depending
on the parameter-inputs how many equations for the calculation in the function
are needed.
Here is an example of my problem:
myfun - function(a, b, c, d)
{
k - length(a)
#here d = 3 for
Thanks again Frank for quick reply.
True,
someobject=2
Test=function(obj,labe)
{
label(obj)=labe
#at this point add the line:
obj
}
Test(someobject,somelabel)
#returns a label. But if you retype
someobject
#the label has gone. That is what I meant by the label not being
Dear list members,
In sem, std.coef() will give me standardized coefficients from a sem model.
But is there a trick so that path.diagram can use these coefficients rather
than unstandardized ones?
Thanks
Steve Powell
From: John Fox jfox_at_mcmaster.ca
Date: Wed 28 Feb 2007 - 14:37:22 GMT
Dear
Dear all, I try to consider overdispersion in a lmer model. But using
family=quasibinomial rather than family=binomial seems to change the fit but
not the result of an anova test. In addition if we specify test=F as it is
recomanded for glm using quasibinomial, the test remains a Chisq test. Are
In ltm (version 0.8-1) you may also check the following functions:
descript(), cronbach.alpha(), mult.choice()
I hope it helps.
Best,
Dimitris
ps, you may find more information about `ltm' as well as sample
analysis files at the Rwiki page:
Hi!
I want to create a plot of a predicted term similar to the function term.plot()
in the gamlss package. I have tried several options, but I could not work it
out so far...
Thank you for your help!
Nikolaus
here is my example:
library(gamlss)
data(rent)
attach(rent)
# Estimating some model
Hello R users,
before asking my question I'd like to stress that I'm an (absolute)
beginner in using R, but enthused about the incredible possibilities of
it.
So I hope my questions are not too stupid.
Here's my problem:
I have a dataset with skewed distributions. In order to obtain approx
Hello R users,
before asking my question I'd like to stress that I'm an (absolute)
beginner in using R, but enthused about the incredible possibilities of
it.
So I hope my questions are not too stupid.
Here's my problem:
I have a dataset with skewed distributions. In order to obtain approx
Handling multiple files automatically is easy in R and has been answered
several times on this list: please pok up the archives as suggested in
the posting guide to this list which also asks you to use a sensible
subject line.
Additionally, there is a FAQ entry called How can I save the result
Tirthadeep wrote:
Hi,
I am using glampath package for L1 regularized logistic regression. I got
the following error messege.
model.fit - glmpath(train.data[,1:20], train.data$RES, family=binomial)
Error in one %*% x : requires numeric matrix/vector arguments
where train.data is
Dear all
I try to print 9 plots on a page, arranged as the code shows below.
nf - layout(matrix(c(1,0,2,0,0,3,0,4,0,5,0,6,0,0,0,0,7,0,8,9), 10,2))
layout.show(nf)
but when I try to plot, an error message
Fehler in plot.new() : Grafikränder zu groß
appears
to verify p.e. with
Then what is the solution?
Duncan Murdoch-2 wrote:
Tirthadeep wrote:
Hi,
I am using glampath package for L1 regularized logistic regression. I got
the following error messege.
model.fit - glmpath(train.data[,1:20], train.data$RES, family=binomial)
Error in one %*% x :
Hi,
I am trying to run some simple tktcl code
## in a file called test.R
require(tcltk)
tt - tktoplevel()
OK.but - tkbutton(tt,text=OK,command=function()tkdestroy(tt))
tkgrid(OK.but)
tkfocus(tt)
Using a batch file with the command
Rterm test.R testOutput.Rout --slave
The GUI pops up but
http://cran.r-project.org/mirror-howto.html
Arin Basu-3 wrote:
Dear All,
Folks at the West Bengal University of Technology has set up a mirror to
distribute R and associated packages. Here is the URL:
http://mirror.wbut.ac.in/CRAN
This will be helpful for R users in South Asia and
On 9/19/07, Karin Lagesen [EMAIL PROTECTED] wrote:
Gustaf Rydevik [EMAIL PROTECTED] writes:
The second warning message tells you that:
2: the condition has length 1 and only the first element will be
used in: if (terminus origin)
You are comparing two vectors, which generate a
Hello,
I have a list of filenames extracted from a data-frame thus:
files - main$file
e.g. file[[1]] returns
[1] Ca00Mn48_0.gout
4702 Levels: Ca00Mn48_0.gout Ca01Mn47_0.gout Ca01Mn47_1.gout
... Ca48Mn00_0.gout
I want to extract the substring that contains the two digits after
Ca. This works
it also works with vectors, e.g.
x - c(Ca00Mn48_0.gout, Ca01Mn47_0.gout, Ca01Mn47_1.gout,
Ca48Mn00_0.gout)
substr(x, 3, 4)
I hope it helps.
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address:
Jonne Zutt wrote:
Hi Samuel,
An easy solution is the following. Let the R script wait until a certain
variable (ok_to_quit) got changed.
Hope it helps,
Jonne.
## in a file called test.R
quit - function() {
.Tcl(set ok_to_quit 1)
tkdestroy(tt)
}
require(tcltk)
tt - tktoplevel()
Dear all
I try to print 9 plots on a page, arranged as the code shows below.
nf - layout(matrix(c(1,0,2,0,0,3,0,4,0,5,0,6,0,0,0,0,7,0,8,9), 10,2))
layout.show(nf)
but when I try to plot, an error message
Fehler in plot.new() : Grafikränder zu groß
appears
to verify p.e. with
Hi, Harold,
In cases like this I usually add some print info to the function. E.g.
tmp$Grade - factor(tmp$Grade)
lapply(split(tmp, f = tmp$Grade),
function(x) {
z - x[,c(mtsc07,DCBASmathscoreSPRING)]
print(levels(factor(z$Grade)))
print(summary(z))
Hi,
as I read, maximum likelihood is the better method for
estimating selection-biased models. But I also want to
predict from that model. Is there any predict method
for the selection function when using maximum
likelihood estimation in micEcon? I couldn't find any.
Many thanks,
Werner
On Wed, 19 Sep 2007, Doran, Harold wrote:
This has come up before and I'll again ask the question why would you
want robust standard errors in lmer?
And I'll again answer: using lmer() does not automatically guarantee correct
model specification, either for the correlation structure or for
system.time( lm( t(y) ~ x ) )
user system elapsed
0.008 0.000 0.010
On Wed, 19 Sep 2007,
[EMAIL PROTECTED] wrote:
Folks,
I have a 3000 x 4 matrix (y), which I need to regress row-by-row against a
4-vector (x) to create a
matrix lm.y of intercepts and slopes. To illustrate:
Hi Doran,
My interests to estimate fixed effects parameters in a mixed model (not the
random effects parameters) and, in addition, in the model there are some
nuisace parameters. For this estimation I am using pseudo-maximum likelihood
methods. First I am estimating nuisance parameters then
lme(as.formula(paste(y~,ww)),random=~1|subj,model)
Gang Chen-3 wrote:
I want to pass a predefined string ww (fa*fb+fc) to function lme so
that I can run
lme(y ~ fa*fb+fc, random = ~1|subj, model)
There must be a simple way to do this. Any help?
Thanks,
Gang
--
View this
Yes, as.formula is the magic tool! Thanks a lot...
Gang
On Sep 19, 2007, at 2:00 PM, Vladimir Eremeev wrote:
lme(as.formula(paste(y~,ww)),random=~1|subj,model)
Gang Chen-3 wrote:
I want to pass a predefined string ww (fa*fb+fc) to function lme so
that I can run
lme(y ~ fa*fb+fc,
Using ann=F just tells R not to put anything in the margins, it does not reduce
the size of the margins. You need to reduce the margin size using par(mar=
...) with appropriate values. You can then shrink what goes in the margins
rather than not plotting it at all (though that is a good first
Hi,
I’m trying to get smooth curves connecting points in a plot using
spline but I don’t get what I whant.
Eg.:
x-1:5
y - c(0.31, 0.45, 0.84, 0.43, 0.25)
plot(x,y)
lines(spline(x,y))
Creates a valley between the first and second points, then peaks at 3rd,
and another valley between 4th and
On Wed, 19 Sep 2007, Greg Snow wrote:
Using ann=F just tells R not to put anything in the margins, it does not
reduce the size of the margins. You need to reduce the margin size
using par(mar= ...) with appropriate values. You can then shrink what
goes in the margins rather than not
how about:
require(splines)
x-1:5
y - c(0.31, 0.45, 0.84, 0.43, 0.25)
yy -predict(interpSpline(x, y))
plot(x, y)
lines(yy)
Katharine Mullen
mail: Department of Physics and Astronomy, Faculty of Sciences
Vrije Universiteit Amsterdam, de Boelelaan 1081
1081 HV Amsterdam, The Netherlands
Try:
lines(spline(x,y, method='n', n=250))
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nestor Fernandez
Sent: Wednesday,
is there a straigthforward way to get the holidays for Toronto ?
like the function for NYSE e.g.
the timeDate class says that setting a finCenter will give the right
holidays, but how?
thank you very much.
stephen
__
R-help@r-project.org mailing
Hi everyone
I need help with subseting a data set. In my dataset there is a
specific row that will either have a value or be blank. I would like to
subset (or split) the dataset into one dataset with the row that has the
value and another dataset that has just the blanks. Now the thing is
that
I think the function you need is 'help.search'; try:
help.search(binomial)
and look for something obvious in the 'stats' package. A good deal quicker
and easier than posting to an internet forum!
Cheers, Mike.
cathelf wrote:
Dear all,
I am trying a find the value p in binomial.
X ~
On 19-Sep-07 23:04:57, Mike Meredith wrote:
I think the function you need is 'help.search'; try:
help.search(binomial)
and look for something obvious in the 'stats' package.
A good deal quicker and easier than posting to an internet forum!
Cheers, Mike.
Well ...
Thanks Patric,
mosaic{vdc} takes gpar parameters. So cex.axis does not work for
mosaic(Titanic, pop=FALSE,
labeling_args=list(rot_labels=c(bottom=90,top=90),cex.axis=0.5))
or
mosaic(Titanic, pop=FALSE,
labeling_args=list(rot_labels=c(bottom=90,top=90)),cex.axis=0.5)
However,
mosaic(Titanic,
On 9/19/07, Karin Lagesen [EMAIL PROTECTED] wrote:
Sorry about this one being long, and I apologise beforehand if there
is something obvious here that I have missed. I am new to creating my
own functions in R, and I am uncertain of how they work.
I have a data set that I have read into a
You can use 'split' to create a list of dataframes and then operate on them:
Day Month Year Time Hits Misses F.type
1 0101 1999 0600 120 80 0600
2 0101 1999 1015 300 10
3 0101 1999 1216 250 50 1216
4 0101 1999 1649 380 0
5 0101 1999 2132 1100
If you don't know ahead of time how many columns you have and
only that they are a mix of numeric and character (to be converted to
factor) then you can do this:
DF - read.table(textConnection(Input), header = TRUE, as.is = TRUE)
f - function(x) if (is.character(x)) factor(x, levels = unique(x))
This is a configuration/OS problem, but it's affecting my use of R ...
Whenever I try to open _any_ vignette (as far as I can tell)
from within R, I get Could not get a file descriptor referring to the
console,
coming from /usr/bin/openvt, which is pointed to by /usr/bin/open,
which is
If you are interested in regular expressions you may also be
interested in a solution using the gsubfn package. Here x
is the input character string, re is Jeffrey's regular expression
and strapply applies the regular expression to x calling the function
which is represented in formula notation
Rolf turner wrote:
I have been trying, unsuccessfully, to use identify() to (simply)
return a list of the indices of points clicked on and overplot (with
say a solid dot) each clicked-on point so that I can see where I've
been. I.e. I don't want to see the indices printed on the screen; I
Hi all,
I'd like to distribute an R package that compiles some (small) C functions
every time it's sourced. The relevant code in the top level R script is as
follows:
system(R CMD SHLIB Selma_extensions.c)
if (.Platform$OS.type==windows) {
slash = '\\'
dyn.load(Selma_extensions.dll)
}
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, 20 September 2007 11:38 a.m.
To: Patrick Connolly; [EMAIL PROTECTED]
Subject: RE: [R] fontsize in mosaic plot lables
Thanks Patric,
mosaic{vdc} takes gpar parameters. So cex.axis does not work for
OK, my mistake. I was
Or maybe:
while(length(ind - identify(x,y,n = 1, plot = F)))
points(x[ind], y[ind], pch = 19)
(highlights each point as you select it, until you click _stop_)
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Crombie, Joe
Sent: Thursday, 20 September
45 matches
Mail list logo