hi R users
I have a large 1D dataset and some of them is NA value .
I found I cound get the spectrum by such a command.
ua=c£¨10£¬30 £¬40£¬50£¬NA£©
spectrum(ua)
and I could not use na.rm just like mean or sd function
How could I get the spectrum of ua ?
thank you .
--
TANG Jie
[[a
On Dec 17, 2013, at 5:53 PM, Simon Kiss wrote:
> I think I'm missing something. I have a data frame that looks below.
> sample.df<-data.frame(var1=rbinom(50, size=1, prob=0.5), var2=rbinom(50,
> size=2, prob=0.5), var3=rbinom(50, size=3, prob=0.5), var4=rbinom(50, size=2,
> prob=0.5), var5=r
I think I'm missing something. I have a data frame that looks below.
sample.df<-data.frame(var1=rbinom(50, size=1, prob=0.5), var2=rbinom(50,
size=2, prob=0.5), var3=rbinom(50, size=3, prob=0.5), var4=rbinom(50, size=2,
prob=0.5), var5=rbinom(50, size=2, prob=0.5))
I'd like to run a series of
--
On Fri, Dec 13, 2013 16:29 GMT David Winsemius wrote:
>
>On Dec 11, 2013, at 7:30 PM, Hin-Tak Leung wrote:
>
>> Here is a rather long discussion etc about freetype 2.5.2, problem with the
>> survival package, and build R 2.15.x with gcc 4.8.x. Please feel free to
>
Hi, I have some questions on how to estimate the survival function from a Cox
model. I know how to do this in R using survfit().
But let's say the model was done is another software, and I was only given the
estimate of baseline cumulative hazard "A0(t=10)" at the specified time "t=10"
(basel
Hi, I have some questions on how to estimate the survival function from a Cox
model. I know how to do this in R using survfit().
But let's say the model was done is another software, and I was only given the
estimate of baseline cumulative hazard "A0(t=10)" at the specified time "t=10"
(basel
Hi, I have some questions on how to estimate the survival function from a Cox
model. I know how to do this in R using survfit().
But let's say the model was done is another software, and I was only given the
estimate of baseline cumulative hazard "A0(t=10)" at the specified time "t=10"
(basel
Dear Michael,
have you tried the fullrange argument of stat_smooth?
ggplot(SpaceShuttle, aes(x = Temperature, y = nFailures / trials)) +
geom_point() +
geom_smooth(method = "glm", family = binomial, aes(weight = trials),
fullrange = TRUE)
Best regrads,
Thierry
___
On 12/18/2013 04:33 AM, bibek sharma wrote:
Hello R user,
I have created two plots (attached!) using the codes below
and would like to merge these figures in one. any suggestions are highly
appreciated!
Thanks,
plot(graph1$yod,graph1$xod,data=graph1)
dfx = data.frame(ev1=graph1$xod, ev2=graph1$
On Dec 17, 2013, at 11:25 AM, Aurélien Philippot wrote:
> thanks David for your answer.
>
> Sorry for the integrand; as you noticed, a parenthesis was missing.
> Here is another integrand which is properly defined:
>
> integrand<-
> function(C,x){-((500+10*x+1*max(0,x-50))^(-1)-(5
On 17/12/2013 22:02, Duncan Murdoch wrote:
On 13-12-17 1:18 PM, Prof Brian Ripley wrote:
The obvious idea to set up a local repository works. It takes 5 mins at
most.
That makes a lot of sense to do on Unix-alikes, but less so on Windows.
A local repository of tarballs needs to be in src/co
I actually agree with the sentiments below -- the optimizer should
support its claims. The reality is sadly otherwise, in my view largely
because of the difficulties in computing the Hessian.
This exchange has been useful, as it highlights user expectations.
Without such dialog, we won't improve o
On 13-12-17 1:18 PM, Prof Brian Ripley wrote:
The obvious idea to set up a local repository works. It takes 5 mins at
most.
That makes a lot of sense to do on Unix-alikes, but less so on Windows.
A local repository of tarballs needs to be in src/contrib below the
URL of the repository. On
Here is a simple example (without the proportional size
bubbles--you've been given some references on that) using the lattice
package:
# one dataframe holds the data from both "sources" I call them.
# they would be data from your two separate dataframes,
# that you call graph1 and graph2
dd <- dat
On Dec 17, 2013, at 8:53 AM, Aurélien Philippot wrote:
> Dear R experts,
>
> I am trying to find numerical solutions for an integral equation.
>
>
> Here is an example:
>
> I started by defining the integrand, as a function of x and C, where x is
> the variable of integration and C is the par
It was not my suggestion that an optimizer should check the Hessian on
every occasion (this would be both time consuming and meaningless),
but I expected it to do so before claiming that a point is at a
minimum, that is, only for the candidate final point.
Neither I have ever thought that n
I have data set with binary responses. I would like to
conduct polychoric principal component analysis (pPCA). I know there are
several packages used in PCA but I could not find one that directly estimate
pPCA and graph the individuals and variables maps. I will appreciate any help
that expand t
dd <- data.frame(longVariableName1=sample(1:4, 10, replace=TRUE),
longVariableName2=sample(1:4, 10, replace=TRUE))
dd
# define who is a case and who is not
transform(dd, case=(longVariableName1==3 | longVariableName2==3))
But in reality I have 9 of those longVariableName variables,
all of this pat
On Dec 17, 2013, at 7:14 AM, ghoshm ghosh wrote:
> Dear R-user,
>
> Please let me know whether there is any package in R, which can solve delay
> differential equations with distributed delay (volterra type).
library(sos)
findFn(volterra:)
http://finzi.psych.upenn.edu/R/library/deSolve/html/ls
Hi Chris,
(extra compelled to answer a Q from my undergrad alma mater :-)
see below:
On Tue, Dec 17, 2013 at 11:13 AM, Christopher W Ryan
wrote:
> dd <- data.frame(longVariableName1=sample(1:4, 10, replace=TRUE),
> longVariableName2=sample(1:4, 10, replace=TRUE))
> dd
> # define who is a case a
Use as.POSIXct instead of as.POSIXlt if you want to use lm() on the dates.
(The data.frame() function makes this transformation for you, but you
evaded data.frame() by adding the column with $<-(), which does not
do the checks and transformations that data.frame() does.)
Bill Dunlap
Spotfire, TIBC
Bert,
Save some room in the stocks for me, If arguing against the use of
'assign' is worthy of being sent to the stocks then fortune(236) is
probably enough evidence to put me next to you.
To the original author, can you tell us more of what you are trying to
accomplish?
Replacement functions are
On Tue, Dec 17, 2013 at 1:04 PM, bibek sharma wrote:
> Hi Sarah,
> It is not about mfrow or mfcol. I would like to see both sets of data in
> one figure.
> All I want was combining these two plots to one.
> Any suggestions?
> Bibek
Suggestions? Yes. Read the link I and others provided about
rep
thanks David for your answer.
Sorry for the integrand; as you noticed, a parenthesis was missing.
Here is another integrand which is properly defined:
integrand<-
function(C,x){-((500+10*x+1*max(0,x-50))^(-1)-(500+10*x+C)^(-1))*
1/(x*0.20*sqrt(10)*sqrt(2*pi))*exp(-0.5*((log(x
Thanks very much for this helpful reply, Thierry
Using aes(weight=trials) in stat_smooth() was part of what I was missing
and solves my main
question.
However, for this data, I want to show the extrapolated prediction over
a wider range than in
the data. Adding xlim() doesn't help here-- the
Hello all, I have a time series defined by
chum$Time1<-as.POSIXlt(chum$Time, format= "%m/%d/%y %H:%M")
and a measured parameter
pa.s
When I create a linear model
with(chum.skin, lm(Time1~pa.s))
I get the following error.
Error in model.frame.default(formula = Time1 ~ pa.s, drop.unused.levels
The obvious idea to set up a local repository works. It takes 5 mins at
most.
On 17/12/2013 18:08, Duncan Murdoch wrote:
So apparently not as simple as I thought it would be. So I'll tell you
what I actually do:
I have a number of packages under development, some on CRAN, some not. I
also wo
Hello R Users,
I apologize in advance if this question is in the wrong place, as my
problem is not with the R Core system, but rather with RDCOMClient package.
I am using a third-party modeling software tool that provides access to
some functions via a *.dll file. Using COMCreate("ClassName") I c
The optimization algorithms did converge to a limit point. But, not to a
stationary point, i.e. a point in parameter space where the first and second
order KKT conditions are satisfied. If you check the gradient at the solution,
you will see that it is quite large in magnitude relative to 0.
So apparently not as simple as I thought it would be. So I'll tell you
what I actually do:
I have a number of packages under development, some on CRAN, some not.
I also work in multiple builds of R pretty frequently, so I like to
install all my packages and commonly used ones from other peop
Dear R-user,
Please let me know whether there is any package in R, which can solve delay
differential equations with distributed delay (volterra type).
Thanks and best regards,
Mini Ghosh
[[alternative HTML version deleted]]
__
R-help@r-projec
What do you mean by "merge these figures in one"? If you want two
figures on one page, see ?par - specifically mfrow and mfcol.
If you want both sets of data in one figure, maybe ?points or ?lines
though I see you're already familiar with at least ?lines.
The list doesn't take most attachments, a
What do you mean by "merge" them into one? Make both graphs appear on
the same page of a document? Make a single figure containing both
graphs? Plot data from both dataframes on the same set of axes?
--Chris Ryan
On Tue, Dec 17, 2013 at 12:33 PM, bibek sharma wrote:
> Hello R user,
>
> I have
The plots did not arrive. The R-help list is fussy about what it allows to go
through.
Actually the best way of doing things is to use dput() to provide sample data.
See https://github.com/hadley/devtools/wiki/Reproducibility or
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r
Hello R user,
I have created two plots (attached!) using the codes below
and would like to merge these figures in one. any suggestions are highly
appreciated!
Thanks,
plot(graph1$yod,graph1$xod,data=graph1)
dfx = data.frame(ev1=graph1$xod, ev2=graph1$yod, ev3=abs(graph1$dif))
symbols(x=dfx$ev1, y
As indicated, if optimizers check Hessians on every occasion, R would
enrich all the computer manufacturers. In this case it is not too large
a problem, so worth doing.
However, for this problem, the Hessian is being evaluated by doing
numerical approximations to second partial derivatives, so the
> On Tue, Dec 17, 2013 at 11:36 AM, Duncan Murdoch
> wrote:
[...]
>> I imagine some package has a function that does what you want, but I don't
>> know it. It wouldn't be hard to put one together as follows:
>>
>> 1. install your package without its dependencies.
This does not seem to work if t
Hi David,
There are lots of places to get help for rkward, but this isn't one of
them. Please try:
http://sourceforge.net/apps/mediawiki/rkward/index.php?title=User_Documentation
Sarah
On Tue, Dec 17, 2013 at 11:59 AM, David Croll wrote:
>
>
> Dear R users and R friends,
>
>
>
>
> I have one
Thanks. As you will see from my reply I misread the manual and it shoud have
been results = xml and I had tried XML.
And result = 'asis' works too. I had thought it was unique to knitr and never
thought to try it.
Thanks
John Kane
Kingston ON Canada
> -Original Message-
> From: jdn
Dear R users and R friends,
I have one question I wish to have answered.
I have RKWard installed on Ubuntu (12.04 LTS), and it works like a
charm. The only problem is that the "autocomplete" function is barely
readable.
Here, you see the parameters of "scan()" written in white, on a
sa
Try this (untested code):
recast(df, formula(paste(xvar, "~", yvar)), id.var=1:2, measure.var=3)
Jean
On Mon, Dec 16, 2013 at 9:11 AM, Jun Shen wrote:
> Hi everyone,
>
> This may be very simple but I couldn't figure it out. I have this function
>
> rsm.lm<-function(data,xvar='xCmin',yvar='yCm
On Tue, 17 Dec 2013 15:21:57 +, Ravi Varadhan wrote:
RV> The optimization algorithms did converge to a limit point. But,
RV> not to a stationary point, i.e. a point in parameter space where
RV> the first and second order KKT conditions are satisfied. If you
RV> check the gradient at the solu
Dear R experts,
I am trying to find numerical solutions for an integral equation.
Here is an example:
I started by defining the integrand, as a function of x and C, where x is
the variable of integration and C is the parameter I am interested in:
integrand<- function(C,x){-((10*x)^(-1)-(1
Thanks!
Btw, install() from the devtools package can do this in theory, but
not in practice, because of a bug (it silently ignores "Suggests").
This is fixed in their github version.
Just to add something useful here.
Gabor
On Tue, Dec 17, 2013 at 11:36 AM, Duncan Murdoch
wrote:
> On 17/12/201
On 17/12/2013 11:26 AM, Gábor Csárdi wrote:
Dear all,
I am trying to install a private package, with its dependencies. However, both
install.packages("sand_1.0.tar.gz", dependencies=TRUE, repos=NULL,
type="source")
and
install.packages("sand_1.0.tar.gz", dependencies="Suggests",
repos=NULL, t
Answer to myself. 'dependencies' are
Not used if ‘repos = NULL’.
Sorry for the noise.
Gabor
On Tue, Dec 17, 2013 at 11:26 AM, Gábor Csárdi wrote:
> Dear all,
>
> I am trying to install a private package, with its dependencies. However, both
>
> install.packages("sand_1.0.tar.gz", dependencies=
On Tue, 17 Dec 2013 08:27:36 -0500, Prof J C Nash (U30A) wrote:
PJCN> If you run all methods in package optimx, you will see results
PJCN> all over the western hemisphere. I suspect a problem with some
PJCN> nasty computational issues. Possibly the replacement of the
PJCN> function with Inf when a
Dear Michael,
Calculate the propotions. Then it is easy to use the weight option of glm
data("SpaceShuttle", package="vcd")
SpaceShuttle$trials <- 6
fm <- glm(cbind(nFailures, 6 - nFailures) ~ Temperature, data = SpaceShuttle,
family = binomial)
fm2 <- glm(nFailures/trials ~ Temperature, data =
Dear all,
I am trying to install a private package, with its dependencies. However, both
install.packages("sand_1.0.tar.gz", dependencies=TRUE, repos=NULL,
type="source")
and
install.packages("sand_1.0.tar.gz", dependencies="Suggests",
repos=NULL, type="source")
fail to install suggested packa
I, like Duncan have not used odfweave, but with knitr you would not use
result=TRUE, rather you would use result='asis'.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#.
On 17/12/2013 10:41 AM, John Kane wrote:
Thanks Duncan.
It sounds logical but neither seem to work.
The code below and with output = gives the same result.
<>=
odfItemize(levels(iris$Species))
@
I am beginning to wonder if I have something wrong with my installation.
I think it's an RTFM pr
Thanks Duncan.
It sounds logical but neither seem to work.
The code below and with output = gives the same result.
<>=
odfItemize(levels(iris$Species))
@
I am beginning to wonder if I have something wrong with my installation.
The worst of this is I have not used odfWeave in at least a year a
On 17/12/2013 10:00 AM, John Kane wrote:
I am trying to get odfWeave to work and I seem to be doing something stupid.
Straightforward inline statements and plain code chunks are working fine but
when I try to use an actual odfWeave statement I get what appears to be the xml
and not odt format.
I am trying to get odfWeave to work and I seem to be doing something stupid.
Straightforward inline statements and plain code chunks are working fine but
when I try to use an actual odfWeave statement I get what appears to be the xml
and not odt format. I am using Apache OpenOffice 3. 4.0. Sys
With ggplot2, I can plot the glm stat_smooth for binomial data when the
response is binary or
a two-level factor as follows:
data("Donner", package="vcdExtra")
ggplot(Donner, aes(age, survived)) +
geom_point(position = position_jitter(height = 0.02, width = 0)) +
stat_smooth(method = "glm", fami
If you run all methods in package optimx, you will see results all over
the western hemisphere. I suspect a problem with some nasty
computational issues. Possibly the replacement of the function with Inf
when any eigenvalues < 0 or nu < 0 is one source of this.
Note that Hessian eigenvalues a
Hello,
At an R prompt type
?lm
Also, take a look at the file R-intro.pdf in your installation of R.
Hope this helps,
Rui Barradas
Em 16-12-2013 10:31, Mahboobe Akhlaghi escreveu:
> hello,
> I have a project in dose response and I should fit some models on my data.
> how can I fit linear and qu
Hi
?lm
but for dose response evaluation package drc is maybe more apropriate.
Regards
Petr
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Mahboobe Akhlaghi
> Sent: Monday, December 16, 2013 11:31 AM
> To: R-help@r-projec
Well, on Windows binary packages are available on CRAN.
And get the source package from CRAN, not Omegahat. CRAN has had to
apply corrections to get package XML to work on Windows.
That said, http://www.omegahat.org/R/src/contrib/XML_3.98-1.tar.gz
downloads and unpacks for me, so the problem
Dear Kristen Ross,
Kristen Ross gmail.com> writes:
>tion; and (3) the R code used for this analysis.
Sorry that I have to remove most of your original message: gmane won't
allow me to post if I add too little compared to the cited text.
This is now wild guessing, since there is nothing I wou
On 12/17/2013 05:50 PM, wrote:
Mydata is as under.
dat=" salary ex
+ 1 1856 1799
+ 2 1856 1800
+ 3 1858 1800
+ 4 1858 1801
+ 5 1862 1803
+ 6 1862 1805
+ 7 1862 1810
+ 8 1865 1805
+ 9 1865 1808
+ 10 1865 1815
+ 11 1865 1820
+ 12 1870 1810
+ 13 1870 1830
+ 14 1880
61 matches
Mail list logo