-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of Sean Zhang
Sent: Wednesday, December 14, 2011 10:07 PM
To: r-help@r-project.org
Subject: [R] how to draw random numbers from many categorical
distributions quickly?
Dear R
Hi all,
How can I set open files that contain values of Zero =0?
These are valid values for the parameters I need to evaluate.
I have tried CSV and tab formats.
Trying XL Connect and/or XLConnectJars dies not seem to work to open
Excel files so I am at a loss on how to get the data into a DF.
It doesn't have anything to do with 0 values.
read.table() is treating everything after the # (the default comment
character) as a comment.
Using comment.char = in read.table() will change that behavior.
Special characters in files cause all sorts of issues.
Sarah
On Thu, Dec 15, 2011 at
Hi
How can I load libraries from a list containing the library names?
Something like this
ListOfLibraries=c(foreign,survival)
for (in in 1:length(ListOfLibraries)){library(as.name(ListOfLibraries[i]))}
I already tried this with no results.
Any help appreciated.
Thanks
--
View this
Hi,
I have confirmed temporal correlation problems in my data. Is there a
possibility to use corCompSymm for a gamm()?
I am an R-beginner.
I have very short time series. There are three years and within each year,
there are 10 weeks. he 10 weeks are the same every year and have not unique
Hello,
I've two data.frames (data1 and data4), dec=. and sep=;.
http://r.789695.n4.nabble.com/file/n4199964/data1.txt data1.txt
http://r.789695.n4.nabble.com/file/n4199964/data4.txt data4.txt
When I do
plot(data1$nx,data1$ny, col=red)
points(data4$nx,data4$ny, col=blue)
, results seem very
Rui,
The answer to your last question is easy--you cannot add a new component
to an object of class htest and have it printed by print.htest. But that
does not mean that you cannot add a component to the output for your own
use.
You will need to decide what you want for output, both
On Thu, Dec 15, 2011 at 8:35 AM, PtitBleu ptit_b...@yahoo.fr wrote:
Hello,
I've two data.frames (data1 and data4), dec=. and sep=;.
http://r.789695.n4.nabble.com/file/n4199964/data1.txt data1.txt
http://r.789695.n4.nabble.com/file/n4199964/data4.txt data4.txt
When I do
On Thu, Dec 15, 2011 at 1:19 PM, anaraster rrast...@gmail.com wrote:
Hi
How can I load libraries from a list containing the library names?
Something like this
ListOfLibraries=c(foreign,survival)
for (in in 1:length(ListOfLibraries)){library(as.name(ListOfLibraries[i]))}
I already tried
Hello,
I want to use function AUC {MIfuns} but I have problem with arguments.
My data:
Fraction Time Variable
C1 0 0.0
C1 15 20.95475
C130 28.55030
C160 36.33064
C190 48.80438
C1 120 60.18636
AUC(data, time = Time, id = Fraction, dv = Variable) ##this is not working!
On Dec 15, 2011, at 8:35 AM, PtitBleu wrote:
Hello,
I've two data.frames (data1 and data4), dec=. and sep=;.
http://r.789695.n4.nabble.com/file/n4199964/data1.txt data1.txt
http://r.789695.n4.nabble.com/file/n4199964/data4.txt data4.txt
When I do
plot(data1$nx,data1$ny, col=red)
Given this interactive session:
an-ls(pat=anova.ag.m2529)
an
[1] anova.ag.m2529.az anova.ag.m2529.can anova.ag.m2529.fl
print(anova.ag.m2529.az)
Analysis of Variance Table
Response: year
Df Sum Sq Mean Sq F value Pr(F)
time 1 14.823 14.823510.598
Hi,
An anova object is stored in anova.ag.m2529.az.
But anova.ag.m2529.az is a character string that happens to be the
*name* of an anova object, but R has no way to know that unless you
specifically tell it that your character string is an object by using
get().
Something like print(get(x))
On Dec 15, 2011, at 1:53 AM, plocq wrote:
Hi,
I use the function fpot of packages evd. If I call the fit that I
obtain
fit, I want to modify the name of the axis and the main title that
is
produced by plot(fit1).
Usually this would be accomplished with
plot(fit, main=main title,
Dear R list,
I have the following data:
set.seed(1)
n - 5 # number of subjects
tt - 3 # number of repeated observation per subject
numco - 2 # number of covariates
x - matrix(round(rnorm(n*numco),2), ncol=numco) # the actual covariates
x
x
[,1] [,2]
[1,] -0.63 -0.82
[2,] 0.18
I'm sorry, the indices of my X matrix are wrong.
It should be:
X = x11 0 0 x12 0 0
0 x11 00 x12 0
0 0 x110 0 x12
x21 0 0 x22 0 0
0 x21 0
Chinese members of this mailing list may be interested to know that the
Chinese translation of 'A Beginner's Guide to R' is now available from
amazon.cn. The full URL is:
On Thu, Dec 15, 2011 at 09:51, Sarah Goslee sarah.gos...@gmail.com wrote:
But anova.ag.m2529.az is a character string that happens to be the
*name* of an anova object, but R has no way to know that unless you
specifically tell it that your character string is an object by using
get().
Hi,
On Thu, Dec 15, 2011 at 10:43 AM, Tony Stocker akostoc...@gmail.com wrote:
On Thu, Dec 15, 2011 at 09:51, Sarah Goslee sarah.gos...@gmail.com wrote:
But anova.ag.m2529.az is a character string that happens to be the
*name* of an anova object, but R has no way to know that unless you
On Thu, Dec 15, 2011 at 10:54, Sarah Goslee sarah.gos...@gmail.com wrote:
print(get(x)[[Pr]]) maybe. Do the get(), then do the subsetting.
It's often neater and more efficient to store your anova objects in a
list, though.
anything since it's still a set of character strings. Could you
Hi guys,
I am new to R and I am bascially trying to load a library that I installed
and use external data that I have. When trying to use an R package called
cummeRbund (http://compbio.mit.edu/cummeRbund/), I am doing:
library(cummeRbund)
Loading required package: RSQLite
Loading required
The arguments time, id and dv take character strings.
AUC(Data, time = Time, id = Fraction, dv = Variable)
Fraction AUC
1 C1 4413.549
Regards,
Chris Campbell
MANGO SOLUTIONS
Data Analysis that Delivers
+44 1249 767700
-Original Message-
From:
Dear All,
Is there a method to diagnostic multicollinearty in logistic regression
models like vif indicator in linear regression ( variance inflation
Factor ...) ?
Thank you in advance
M
--
Mohamed Lajnef,IE INSERM U955 eq 15#
P?le de Psychiatrie
I was in a presentation of optimizations fitted with both MPlus and
SAS yesterday. In a batch of 1000 bootstrap samples, between 300 and
400 of the estimations did not converge. The authors spoke as if this
were the ordinary cost of doing business, and pointed to some
publications in which the
Thanks you very much! The way plot(fit, main=main title, xlab=X-axis
lable, ylab=y-axis label) seems to work quite well, I didn't notice that
I could do this.
I have in fact one more problem with it : the fact is that I have three
plots that are called by the function. I can specify my three
On Dec 15, 2011, at 11:34 AM, Mohamed Lajnef wrote:
Dear All,
Is there a method to diagnostic multicollinearty in logistic
regression
models like vif indicator in linear regression ( variance inflation
Factor ...) ?
Wouldn't matrix representation of the predictor side of the
On Dec 15, 2011, at 11:30 AM, plocq wrote:
Thanks you very much! The way plot(fit, main=main title, xlab=X-
axis
lable, ylab=y-axis label) seems to work quite well, I didn't
notice that
I could do this.
You are replying to a message on a mailing list (which most people do
NOT see as a
This really depends on more than just the optimizer, a lot can depend on what
the data looks like and what question is being asked. In bootstrapping it is
possible to get bootstrap samples for which there is no unique correct answer
to converge to, for example if there is a category where
Dear All,
I am struggling with the following problem: I am given a NxN symmetric
matrix P ( P[i,i]=0, i=1...N and P[i,j]0 for i!=j) which stands for the
relative distances of N points.
I would like use it to get the coordinates of the N points in a 2D
plane. Of course, the solution is not
That's exactly what ordination is for (not clustering).
I'd try principal coordinates analysis, or non-metric multidimensional
scaling, depending on whether the dissimilarity you'v been given is
metric or nonmetric.
There are implementations of both in the ecodist package, and in
various other
On Thu, Dec 15, 2011 at 10:08 AM, Lorenzo Isella
lorenzo.ise...@gmail.com wrote:
Dear All,
I am struggling with the following problem: I am given a NxN symmetric
matrix P ( P[i,i]=0, i=1...N and P[i,j]0 for i!=j) which stands for the
relative distances of N points.
I would like use it to get
Hello,
I've posted a question about this subject yesterday, but since there was no
R code to comment,
no one did.
I'm trying to have the print method for class 'htest' print some extra
information common in some test, like the time series linearity related
tests. Many of them have an 'order'
Hello everybody,
I have to compute something in this form:
x = prod(a:b) / prod(c:d),where: a c and b d and obviously: a
b and c d
I cannot make assumptions on the relative position of c,b and a,d.
The problem is that a,b,c,d are large and the products are huge (R return Inf).
Their
Thanks a lot!
Precisely what I had in mind.
One last question (an extension of the previous one): can this be
extended to points in 3D? Once again, given the distance matrix, can I
reconstruct a set of coordinates (among many possible) for the points in
three-dimensional space?
Cheers
Hello all,
I'm having difficulty with setting up a mixed model using lme in the
nlme package. To summarize my study, I am testing for effects of
ornamentation on foraging behavior of wolf spiders. I tested spiders
at two different ages (penultimate vs. mature) and of two different
phenotypes (one
Use logs?
Michael
On Thu, Dec 15, 2011 at 1:35 PM, Alberto Magni
alberto.magn...@gmail.com wrote:
Hello everybody,
I have to compute something in this form:
x = prod(a:b) / prod(c:d), where: a c and b d and obviously: a
b and c d
I cannot make assumptions on the relative position
On Thu, Dec 15, 2011 at 10:47 AM, Lorenzo Isella
lorenzo.ise...@gmail.com wrote:
Thanks a lot!
Precisely what I had in mind.
One last question (an extension of the previous one): can this be extended
to points in 3D? Once again, given the distance matrix, can I reconstruct a
set of
On Thu, Dec 15, 2011 at 10:35 AM, Alberto Magni
alberto.magn...@gmail.com wrote:
Hello everybody,
I have to compute something in this form:
x = prod(a:b) / prod(c:d), where: a c and b d and obviously: a
b and c d
I cannot make assumptions on the relative position of c,b and a,d.
On Dec 15, 2011, at 12:26 PM, Rui Barradas wrote:
Hello,
I've posted a question about this subject yesterday, but since there
was no
R code to comment,
no one did.
I'm trying to have the print method for class 'htest' print some extra
information common in some test, like the time series
Mari Pesek marifrances at gmail.com writes:
Hello all,
I'm having difficulty with setting up a mixed model using lme in the
nlme package. To summarize my study, I am testing for effects of
ornamentation on foraging behavior of wolf spiders. I tested spiders
at two different ages
On Dec 15, 2011, at 1:35 PM, Alberto Magni wrote:
Hello everybody,
I have to compute something in this form:
x = prod(a:b) / prod(c:d),where: a c and b d and obviously: a
b and c d
I cannot make assumptions on the relative position of c,b and a,d.
The problem is that a,b,c,d are
You may find the following discussion helpful.
http://comments.gmane.org/gmane.science.biology.informatics.conductor/37388
On Sun, Dec 11, 2011 at 8:08 AM, ali_protocol
mohammadianalimohammad...@gmail.com wrote:
Dear all,
Is there anyway too generate MA plot for 2 qPCR assays (an array of 2x
Somewhere I've seen an example of an xyplot() where the key was placed
in a location of a missing panel. For example, if there were 3
conditioning levels, the panel grid would look like:
34
12
In this (possibly imaginary) example, there were scatter plots in
locations 1:3 and location 4 had no
Tal,
Keep up the great work with r-bloggers. I'm the organizer of the Dallas RUG
and if there is any content you wish to provide from the Dallas RUG meetup
site feel free to post it at www.r-bloggers.com/RUG. We're still a fairly
young user group but we do have some content from our
Hello,
I believe I can help, or at least, my code is simpler.
First, look at your first line:
idd - length(diag(1,tt)) # length of intercept matrix
#
not needed: diag(tt) would do the job but it's not needed,
why call 2 functions, and one of them, 'diag', uses memory(*), if the
result
You're right, David,
The first line is wrong, it should be
... df=2:4 ...
As for creating something, try
ht - structure( ... etc ...
ht
class(ht)
See what is printed and what function prints it.
Rui
--
View this message in context:
After checking the original data in Excel for blanks and running Summary(cm3)
to identify any null values in my data, I'm unable to identify an instances.
Yet when I attempted to use the data in Random Forest, I get the following
error. Is there something that Random Forest is reading as null
Use str() on your object and attach the result. For even faster help, use
dput() on a *small* sample of your data to make the problem reproducible.
My guess is that there are characters or, less likely, factors lurking about...
Michael
On Dec 15, 2011, at 2:39 PM, Lost in R
On Dec 15, 2011, at 2:07 PM, Ben Bolker bbol...@gmail.com wrote:
Mari Pesek marifrances at gmail.com writes:
Hello all,
I'm having difficulty with setting up a mixed model using lme in the
nlme package. To summarize my study, I am testing for effects of
ornamentation on foraging
On Dec 15, 2011, at 2:16 PM, Rui Barradas wrote:
You're right, David,
The first line is wrong, it should be
... df=2:4 ...
As for creating something, try
ht - structure( ... etc ...
ht
class(ht)
See what is printed and what function prints it.
Well, the function is
hello,
i need to recode a variable, however the contraction is causing problems. i
had the code to change this written down somewhere and i just can't find it, of
course.
i am using the car library to recode.
it's only 5 levels when it should have 6... when i do levels(trust).
here is my
Hi all,
I have a matrix
a-c(2,3,4,Inf)
b-as.matrix(a)
[,1]
[1,]2
[2,]3
[3,]4
[4,] Inf
range(b, finite=TRUE)[2] (this is the maximum)
[1] 4
There is a pre-def function to extract the location (in terms of rows) of
the value in the matrix.
In my example would be
3 (max is
Hello,
Once again, and as simple as possible,
res - data.frame(ord=2:4, df=2:4, Q=c(0.0129, 0.049, 0.0684),
p=c(0.9936, 0.9972, 0.9994))
ht2-structure(
list(statistic=c(Q=res$Q[1]),
p.value=res$p[1],
parameter=c(df=res$df[1]),
alternative=It
Thanks Michael - That was a help, i got rid of the , in my numbers and the
% which were making many of the numeric variables FACTORS. It appears that
I made all of the those revisions, but still getting the same error.
Attached is the str() output if anyone could shed some light it would be
much
The documentation for the arima function in the package stats has
a slight error. It references:
Ripley, B. D. (2002) Time series in R 1.5.0. R News, 2/1,
2â7. [1]http://www.r-project.org/doc/Rnews/Rnews_2002-1.pdf
This should be:
Ripley, B. D. (2002) Time series in R 1.5.0. R News, 2/2,
You can either use \ to escape a character or you can mix two kinds
of quotes. If you used double quotes around your text entries you can
have singel quotes in the interior of the text.
'test of bslash-single-quote \' continues'
[1] test of bslash-single-quote ' continues
test of isolated
Dear Nicole,
On Thu, 15 Dec 2011 14:49:04 -0600 (CST)
Nicole Marie Ford nmf...@uwm.edu wrote:
hello,
i need to recode a variable, however the contraction is causing problems. i
had the code to change this written down somewhere and i just can't find it,
of course.
i am using the car
On 15.12.2011 04:09, Xu Wang wrote:
I am still interested in this. Is there no way to pay directly online? via
paypal or other?
No.
Uwe Ligges
Thanks,
Xu
--
View this message in context:
Dear John and David,
Thanks so much for the advice. I have only come across this one other time in
my research, so the code escaped me! Much obliged!
~Nicole
Ph.D. Student
University of Wisconsin Milwaukee
c: 813.786.5715
e: nmf...@uwm.edu
- Original Message -
From: John Fox
I think you should subclass htest and write a print method
for that subclass. E.g.,
print.htest_rb - function(x, ...) {
+NextMethod(x, ...)
+cat(all.orders =, x$all.orders, \n)
+invisible(x)
+ }
ht2$all.orders - THIS IS THE 'all.orders' COMPONENT
class(ht2) -
I'm running a linear model in R using the car package.
I have a variable education, which i have recoded and regrouped to my
wishes.
However, R seems to place each element of that variable in alphabetical
order.
When I am running the model, don't I need the model order from lowest to
highest to
I believe this needs to be posted on general statistical help list
like stats.stackexchange.com
as you appear to have some confusion about how linear regression
works, especially with categorical variables.
?ordered
might help you with R's way of dealing with the issues that I believe
you're
Le jeudi 15 décembre 2011 à 21:15 +0100, Trying To learn again a écrit :
Hi all,
I have a matrix
a-c(2,3,4,Inf)
b-as.matrix(a)
[,1]
[1,]2
[2,]3
[3,]4
[4,] Inf
range(b, finite=TRUE)[2] (this is the maximum)
[1] 4
There is a pre-def function to extract the
David Winsemius dwinsem...@comcast.net writes:
On Dec 15, 2011, at 11:34 AM, Mohamed Lajnef wrote:
Dear All,
Is there a method to diagnostic multicollinearty in logistic
regression
models like vif indicator in linear regression ( variance inflation
Factor ...) ?
Wouldn't matrix
Hi all,
I am trying to extract the residuals from the following Weibull model..
The results I am getting are a bit strange.
library(survival)
mod=survreg(Surv(time, delta) ~ p1+p2+p3, data=testd, dist=weibull)
ores=resid(mod, type='response')
Are the commands correct? How do I get teh
I'm running an ordered logit in R with the Zelig package and am trying to
calculate some predicted probabilities. However, I get the following error
message.
x.low - setx(mod, cars=1)Error in dta[complete.cases(mf), names(dta) %in%
vars, drop = FALSE] :
incorrect number of dimensions
I
Paul Johnson pauljoh...@gmail.com writes:
I was in a presentation of optimizations fitted with both MPlus and
SAS yesterday. In a batch of 1000 bootstrap samples, between 300 and
400 of the estimations did not converge. The authors spoke as if this
were the ordinary cost of doing business,
Hello Everyone, I have tried using open.ncdf(con,..) to open .nc files in R,
but somehow, its showing that R could not find function open.ncdf. I am new
to R, please help me out with this
Thanks
--
View this message in context:
http://r.789695.n4.nabble.com/nc-files-query-tp4203048p4203048.html
Hi,
I'm trying to plot a series of lines without data point markers, except
for the first data point in each line, which I want to also mark with an
open circle.
The following code accomplishes this for a single line:
xyplot(yy ~ xx,
panel=function(x, y){
On Fri, Dec 16, 2011 at 1:22 AM, Max Kuhn mxk...@gmail.com wrote:
Somewhere I've seen an example of an xyplot() where the key was placed
in a location of a missing panel. For example, if there were 3
conditioning levels, the panel grid would look like:
34
12
In this (possibly imaginary)
Hi
Thanks you very much! The way plot(fit, main=main title, xlab=X-axis
lable, ylab=y-axis label) seems to work quite well, I didn't notice
that
I could do this.
I have in fact one more problem with it : the fact is that I have three
plots that are called by the function. I can
Hi
Hi,
I have a R package with some functions made all of then only with R
code. I use the command R CMD build to build a package that I can
install on linux, windows or mac, because all the code is only R code.
But I have some problems with R version. For each new R version I need
Hi all
I am trying to solve a combinatorial optimization problem. Basically, I can
reduce my problem into the next problem:
1.- Given a NxN grid of points, with some values in each cell
2.- Find the combination of K points on the grid such that, the maximum
mean value is obtained
I took the
Dear All,
I am using the svm() function of package e1071 for creating Support
Vector Machines prediction models. As far as I understand, there is no
function in this package to extract rules of prediction. Is there some
other package with such a functionality?
Thanks in advance,
Paul
74 matches
Mail list logo