Dear R Users
on a self-written function for calculating maximum likelihood probability (plz
check function code at the bottom of this message), one value, wden, suddenly
jump to zero. detail info as following:
w[11]=2.14
lnw=2.37 2.90 3.76 ...
regw=1.96 1.77 1.82
Wongsang,
Just to be clear R.utils is different than utils
As Henrik notes gunzip has been in R.utils ( see http://cran.r-project.org/)
for some time. It works
like a champ. R.utils is a great package.
On Wed, Sep 15, 2010 at 9:30 AM, Wonsang You y...@ifn-magdeburg.de wrote:
Dear Henrik,
On 9/15/10 10:38 AM, dadrivr wrote:
Hi everyone,
I am trying to make some publication-quality plots for use in Microsoft
Word, but I am having trouble creating high-quality plots that are supported
by Microsoft Word.
If I use the R plot function to create the figure, the lines are jagged, and
Below is the code that I am using in a much larger function. I would
expect a bankfull measure at zero to be between 0.6 and 0.8 approxfun
is returning 0.8136986. I am sure that I am missing something.
measure_bkf - (structure(list(measurment_num = c(0, 0.2, 0.4, 0.6,
0.8, 1, 1.2,
1.4, 1.6,
Hi,
I have a dataset with a response variable and multiple factors with more
than two levels, which I have been fitting using lm() or glm(). In
these fits, I am generally more interested in deviations from the global
mean than I am in comparing to a control group, so I use contr.sum()
as the
sorry, a typo. the following code is an example from my computer and the real
one just has more variables.
the w[11] is the w[5] in the wden equation. the value of wden is calculated
based on the ifelse condition. it may equal to 1 when one is working; if not,
it
will equal to the value
On 15/09/2010 3:48 PM, stephen sefick wrote:
Below is the code that I am using in a much larger function. I would
expect a bankfull measure at zero to be between 0.6 and 0.8 approxfun
is returning 0.8136986. I am sure that I am missing something.
measure_bkf- (structure(list(measurment_num =
I have a data set and I want to procedure to model fitting (e.g., Poisson,
Gausian, binomial, quasipoisson etc.). I'd like to know if there is an
easier way to do this in R.
Thank you in advance.
--
Atenciosamente,
Diogo Borges Provete
==
Biólogo
Mestre em Biologia
Thanks and I'll strip the code down even more in future posts.
Stephen
On Wed, Sep 15, 2010 at 3:05 PM, Duncan Murdoch
murdoch.dun...@gmail.com wrote:
On 15/09/2010 3:48 PM, stephen sefick wrote:
Below is the code that I am using in a much larger function. I would
expect a bankfull measure
Diogo B. Provete wrote:
I have a data set and I want to procedure to model fitting (e.g., Poisson,
Gausian, binomial, quasipoisson etc.). I'd like to know if there is an
easier way to do this in R.
Easier than what ?
There is no shortage of R functions and packages to fit almost any type
of
thanks. Ravi and Nash.
I will read the new package and may use it after I am familiar with it. I may
bother both of you when I have questions.thanks for that in advance.
Nan
from Montreal
Hi Nan,
You can take a look at the optimx package on CRAN. John Nash and I wrote
this
package to
x -
c(-0.48,-0.48,-0.42,-0.26,0.58,0.48,0.47,0.54,0.5,0.52,0.52,0.56,0.58,0.61,0.68)
y - c(0,0.2,0.4,0.6,0.8,1,1.2,1.4,1.6,1.8,2,2.2,2.4,2.6,2.8)
s - approxfun(x[4:5], y[4:5], ties=mean)
s(0)
#This is the value that I want. The first zero crossing in the order
of y. #In other words in
Hi there,
I'm trying to install the package RcppArmadillo in my R 2.11.1 which I
installed
and regularly update via Ubuntu's repositories.
When I try to install RcppArmadillo from CRAN I get:
install.packages('RcppArmadillo', lib='~/myRlibs')
[...]
g++ -shared -o RcppArmadillo.so
The fact that you are asking what a p-value is indicates that you do not have
enough of a background for us to be able to help you. It is not that we do not
want to help, just that anything we could say in an e-mail would likely do more
harm than good at this point.
You should either consult
Hi, I have a string like 1,2,5,7,8.
From this I want to create a numeric vector of length 5 (total number
of numbers in above string), with each element will be the number in
above string. Is there any possibility to doing this?
Thanks and regards,
__
Try this:
x - scan(textConnection(1,2,5,7,8), sep = ,)
On Wed, Sep 15, 2010 at 5:42 PM, Christofer Bogaso
bogaso.christo...@gmail.com wrote:
Hi, I have a string like 1,2,5,7,8.
From this I want to create a numeric vector of length 5 (total number
of numbers in above string), with each
I have a matrix:
C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12
R1 0 0 0 0 0 5 0 0 0 0 0 0
R2 0 0 0 0 0 3 0 0 0 0 0 0
R3 0 0 0 0 0 0 4 0 0 0 0 0
R4 0 0 0 0 0 0 2 0 0 0 0 0
R5 1 0 0 0 0 0 0 0 0 0 0 0
R6 8 0 0 0 0 0
x - 1,2,5,7,8
as.numeric(unlist(strsplit(x, ',')))
[1] 1 2 5 7 8
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
project.org] On Behalf
On Wed, Sep 15, 2010 at 3:48 PM, Matias Salibian-Barrera
msalib...@yahoo.ca wrote:
Hi there,
I'm trying to install the package RcppArmadillo in my R 2.11.1 which I
installed
and regularly update via Ubuntu's repositories.
When I try to install RcppArmadillo from CRAN I get:
On 15 September 2010 at 13:48, Matias Salibian-Barrera wrote:
| I'm trying to install the package RcppArmadillo in my R 2.11.1 which I
installed
| and regularly update via Ubuntu's repositories.
We welcome questions on Rcpp et al on the rcpp-devel list. There is also the
r-sig-debian list
Thanks to all that helped. I had not compiled R myself, so it was rather
puzzling. I finally decided to re-install R from scratch. First I verified I
had
the right repositories listed and ran:
sudo apt-get update
sudo apt-get remove r-base
sudo apt-get autoremove
sudo apt-get install r-base
Hi all:
I have a problem when I want to do operation a sequence or matrix created by
loop and list() or data.frame(). Here is the example.
for(i in 1:n) (k[i]=list(c(0:max[i])))
k[1]+1
Error in k[1] + 1 : non-numeric argument to binary operator
What should I do to correct this
Chien-Pang -
Here's a *reproducible* example that should answer your question:
k = list()
n = 10
max = 10:19
for(i in 1:n) (k[i]=list(c(0:max[i])))
k[[1]] + 1
[1] 1 2 3 4 5 6 7 8 9 10 11
- Phil Spector
Hi all,
I ran into a small issue when converting a list of vectors to a data
frame. The Issue I'm having is described by the snippet below:
#
# Convert a list of vectors into a data.frame
strlen = 256
s.long.a = paste(
How can I get the outlier in this boxplot of Score to be represented by
the corresponding value in SubNo?
score=c(6,6,7,14,5,7,6,8)
SubNo=1:8
mydata=data.frame(SubNo, score)
boxplot(mydata$score)
Thanks!
Kevin
[[alternative HTML version deleted]]
SubNo[identify(rep(1,8),mydata$score)]
--
Clint BowmanINTERNET: cl...@ecy.wa.gov
Air Quality Modeler INTERNET: cl...@math.utah.edu
Department of Ecology VOICE: (360) 407-6815
PO Box 47600FAX:(360)
Kevin -
Here's one way:
z = boxplot(mydata$score,outline=FALSE,ylim=range(mydata$score))
text(1,z$out,SubNo[which(score == z$out)])
- Phil Spector
Statistical Computing Facility
Hi Cristofer,
Try
as.numeric(strsplit(x, ,)[[1]])
HTH,
Jorge
On Wed, Sep 15, 2010 at 4:42 PM, Christofer Bogaso wrote:
Hi, I have a string like 1,2,5,7,8.
From this I want to create a numeric vector of length 5 (total number
of numbers in above string), with each element will be the
Dear R gurus,
I regularly come across a situation where I would like to apply a function to a
subset of data in a dataframe, but I have not found an R function to facilitate
exactly what I need. More specifically, I'd like my function to have a context
of where the data it's analyzing came
Hi all:
I have a problem when I want to do operation a sequence or matrix created by
loop and list() or data.frame(). Here is the example.
for(i in 1:n) (k[i]=list(c(0:max[i])))
k[1]+1
Error in k[1] + 1 : non-numeric argument to binary operator
What should I do to correct this
I'm reading in some data from a csv file, and it's reading in some of the
columns as character variables instead of numeric. I know I can fix this by
doing as.numeric for each of the columns, but the problem is I have a LOT of
different quantitative variables that I would have to do this for.
I've
Hi:
Try this:
library(plyr)
func - function(x, y) {
m - median(x)
if(m 2 m mean(y)) ret - TRUE else ret - FALSE
ret
}
ddply(tmp, .(z), summarise, r = func(x, y))
z r
1 a FALSE
2 b TRUE
3 c TRUE
HTH,
Dennis
On Wed, Sep 15, 2010 at 2:45 PM, Mark Ebbert
On Sep 15, 2010, at 5:45 PM, Mark Ebbert wrote:
Dear R gurus,
I regularly come across a situation where I would like to apply a
function to a subset of data in a dataframe, but I have not found an
R function to facilitate exactly what I need. More specifically, I'd
like my function to
I would approach this slightly differently. I would make func a
function of x and y.
func - function(x,y){
m - median(x)
return(m 2 m y)
}
Now generate tmp just as you have. then:
require(plyr)
res - daply(tmp, .(z), summarise, res=func(x,y))
I believe this does the trick
Hi Richard,
Something like workf[ , columns] - data.frame(lapply(workf[,
columns], as.numeric)) should do what you're after. However, this is
really a bit of a work around to the real problem. Can you provide
more details on the csv file you are reading in? Perhaps the first
couple rows or
Hi Nicolas,
Try (untested):
with(pop, table(factor(xloc, levels = 1:20), factor(loc, levels = 1:25)))
HTH,
Jorge
On Wed, Sep 15, 2010 at 7:31 PM, Nicolas Gutierrez wrote:
Hi All,
Im trying to superimpose (or add) two matrices:
1. resulting from a table function with frequencies:
Hi:
Try something like this:
ind - as.matrix(expand.grid(rownames(U), colnames(U)))
Uempty[ind] - U[ind]
ind should be a two column matrix of (row, col) indices. Then just replace
the values of Uempty associated with those indices with the corresponding
entries of U.
HTH,
Dennis
On Wed, Sep
Kevin,
On 2010-09-15 16:37, Phil Spector wrote:
Kevin -
Here's one way:
z = boxplot(mydata$score,outline=FALSE,ylim=range(mydata$score))
text(1,z$out,SubNo[which(score == z$out)])
- Phil Spector
On Sep 15, 2010, at 7:40 PM, Dennis Murphy wrote:
Hi:
Try something like this:
ind - as.matrix(expand.grid(rownames(U), colnames(U)))
Uempty[ind] - U[ind]
ind should be a two column matrix of (row, col) indices. Then just
replace
the values of Uempty associated with those indices with the
Hi All,
I’m trying to superimpose (or add) two matrices:
1. resulting from a table function with frequencies:
U=table(pop$xloc, pop$yloc))
14 15 16 17 18 19 20 21 22
5 0 0 0 0 0 0 0 0 0
7 0 0 0 0 0 0 0 0 0
8 0 0 0 0 0 0 0 0 0
9 0 0 0 0 0 0
I have a dataset relating the effects of engineering works on the level of
salinity in a river before and after the works. I have modelled this using
linear mixed effects models to determine if the significance and level of the
response to the works. I am wanting to calculate the se of
On Sep 15, 2010, at 6:10 PM, Magnus Thor Torfason wrote:
Hi all,
I ran into a small issue when converting a list of vectors to a data
frame. The Issue I'm having is described by the snippet below:
#
# Convert a list of vectors into
Hi:
Why is phase nested within sites? Shouldn't sites and phase be crossed?
After all, there is one intervention (works) that purportedly affects the
river both upstream and downstream. Moreover, why is log(flow) being treated
as both a fixed and random effect?
Just curious,
Dennis
On Wed, Sep
Thanks for your help!
My computer died, and I set up Sweave on another computer, on which it is
working perfectly. So perhaps I'll never be sure what the problem was on
the other machine.
On Tue, Sep 14, 2010 at 12:39 PM, Duncan Murdoch
murdoch.dun...@gmail.comwrote:
On 14/09/2010 1:18 PM,
Hi all,
I want to put several figures in a one figure for easy comparison, so i
need to use the same methods to plot these figures. The following is an
example. I also list my method, but it does not work.
#Example data
x- 1:10; y- 1:10; z- outer( x,y,+);z2- outer( x,y,-)
#Quick view them
I think this is fixed now. There were actually two bugs:
I fixed an old one a few days ago, but my fix didn't handle the case of
unsorted x properly. (I haven't checked whether the old code handled
that properly; I'd guess not, but it might have.) Now I've fixed my new
bug.
*Please* test
Hi Jane,
Try this:
split.screen( rbind(c(0, .8,0,1), c(.8,1,0,1)))
# [1] 1 2
# first screen split into a (2, 1) configuration
ind - split.screen(c(2,1), screen=1)
screen(ind[1])
image(x, y, z, col = cols, zlim = zr)
screen(ind[2])
image(x, y, z2, col = cols, zlim = zr)
# Place the common,
Hi
On 13/09/2010 8:03 p.m., Benoit Boulinguiez wrote:
Hi all,
I'm still seeking for tweaking the appearance of the color legend in a
bar goemetry with ggplot2.
I can't seem to control the filling of the colour legend squares
take this,
ggplot(diamonds, aes(clarity, fill=color,colour = cut)) +
I am looking for a way to find the roots of a non-polynomial
expression. I know R has a few ways to deal with polynomials, but, I
could not find a method that deals with functions involving e^(x) type
arguments, that have complex roots as well as real roots.
Any ideas?
Thanks,
Toros
Dear Prof:
My name is Chuan.I from Malaysia.I am a beginner for R.I need favor for Prof.
This is my data:
Hello Chuan,
If you just want a matrix with the numbers 1 to 64 arranged by row...
m - matrix(1:64, ncol=8, byrow=TRUE)
But perhaps I don't understand your question properly ?
Michael
On 16 September 2010 12:46, chuan zun liang chuan...@yahoo.com.my wrote:
Dear Prof:
My name is Chuan.I
I will get R-dev tomorrow, and give it a try. Where do I check out the svn?
thanks,
Stephen
On Wed, Sep 15, 2010 at 10:00 PM, Duncan Murdoch
murdoch.dun...@gmail.com wrote:
I think this is fixed now. There were actually two bugs:
I fixed an old one a few days ago, but my fix didn't handle
you are welcomed.
Steve
On Wed, Sep 15, 2010 at 6:11 PM, Suphajak Ngamlak
supha...@phatrasecurities.com wrote:
Thank you so much. It works well
Best Regards,
Suphajak Ngamlak
Equity and Derivatives Trading
Phatra Securities Public Company Limited
Tel: +662-305-9179
Email:
101 - 153 of 153 matches
Mail list logo