can you please suggest me any book or paper or website which explains this
problem because I have started using R before 3 weeks only and i will not be
able to understand your whole code.so if i will study about this problem it
will be very good for me.I have tried in some books and also on
Hi R-help,
I have a dataframe consisting of a time-series [t, v]. The timestamps aren't
at all evenly spaced. The values are continuous. I've been able to graph
this as a step function (which is what it should be) in ggplot2, using the
'step' geom. Now I would like to take the integral of the
Madana,
The code below may work (untested though):
#above is the same as you wrote
require(multicore)
read.data.exmple - function(f)
{
dat - read.csv(f, header=FALSE, sep=\t, na.strings=,dec=.,
strip.white=TRUE, fill=TRUE)
data_1 - sqldf(SELECT V2, V14, MIN(V16) FROM dat WHERE
Great! The second way really helped me! Thank you so much!
--
View this message in context:
http://r.789695.n4.nabble.com/elimination-duplicate-elements-sampling-tp3652791p3687613.html
Sent from the R help mailing list archive at Nabble.com.
__
Hello,
I would like to implement a turn-of-the-month' trading strategy in R.
Given a daily series of stock market return data as a zoo object, the strategy
would go long (buy) four trading days before the end of the month, and sell the
third trading day of the following month.
How can I
David, thanks, I think that should work perfectly
Much obliged
dfrm - expand.grid(A=1:3, B=1:3)
dfrm$counts - 1:9
xtabs(counts~A, data=dfrm)
A
1 2 3
12 15 18
barplot(xtabs(counts~A, data=dfrm), xlab=Counts by A level)
--
David Winsemius, MD
West Hartford, CT
Hi Folks,
Ran into something I'd really like to do in R simply/elegantly, but my R -
coding skills seem surpassed. This is the thing. Imagine the following data:
labs-c(abcdef,abcgg,tgthefdk,tgtijuel,tgtnjmoi,gbnt,dlift)
dat-c(0.5,0.25,1,2,16,0.250,4)
dframe-data.frame(labs,dat)
I would like to
Thanks everyone! I finally got some code to work (thanks to William Dunlap).
--
View this message in context:
http://r.789695.n4.nabble.com/matched-pairs-tp3687506p3687864.html
Sent from the R help mailing list archive at Nabble.com.
__
Hi all,
I'm having trouble locating a script that will allow to me to create graphs
that show compound functions as a function of the simple function, rather
than just x (or time as it is in my case).
Currently I have the following functions defined in my script:
T1-function(t)
hi,
When I type library(ts) (I am working on an ubuntu machine), I get the
following error:
library(ts)
Error in library(ts) : there is no package called 'ts'
I did a few google searches and it seems like ts is no longer
availableis that correct?
It seemed to me that I would need to
Working! Many thanks, good solutions
--
View this message in context:
http://r.789695.n4.nabble.com/Lattice-place-ticks-only-on-y-axis-tp3684094p3688167.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing
Dear users,
I am new to R and have couple of problems with xyplot.
A) I am trying to use the xyplot to plot mean concentration vs time across 5
dose groups.
When i use the following script
xyplot(mean~time,groups=dose,type=b,panel=panel.superpose). R generates
the plot, but i have no control
Got it working using layout.widths = list(ylab.axis.padding = 0.5))) and
adjusting the print position in print(plot1,
position=c(-0.018,0.221,0.741,0.466)). Thx
--
View this message in context:
http://r.789695.n4.nabble.com/Lattice-distance-of-Y-axis-label-from-plot-tp3686855p3688172.html
Hello,
I am currently working on a script and I output plots to pdf using
pdf(...)
plot(...)
dev.off()
then later I was trying to plot something and when I run just
plot(...)
nothing appears. Is there something about using plot(..) after dev.off()
that does not allow the window to pop up? In
Hi,
I have a triple loop that goes through all elements of a list
Lst[[k]][[i,j]] and I want to pick only elements of Lst[[k]][[i,j]] 0.4
or any value. Then I want to store the values of Lst[[k]][[i,j]] together
with their i,j,k values in another list. Say I have Lst[[2]][[4,7]] = 0.6, I
I'm trying to install the XML package on Ubuntu 10.10, and I keep getting
a warning message the XML could not be found and had non-zero exit
status. How can I fix this problem?
install.packages()
Loading Tcl/Tk interface ... done
--- Please select a CRAN mirror for use in this session ---
Hi,
I know there is a package 'elipse' available but I'm not sure how to use it
for my specific implementation.
What I would like to do is fit an elipse to two lines of identity (at right
angles to each other), as indicated in the following figure:
Hi all,
I am using the glmnet R package to run LASSO with binary logistic
regression. I have over 290 samples with outcome data (0 for alive, 1 for
dead) and over 230 predictor variables. I currently using LASSO to reduce
the number of predictor variables.
I am using the cv.glmnet function to
Probability - function(N, f, w, b, y, t, q) {
#N is the number of lymph nodes
#f is the fraction of Dendritic cells (in the correct node) that have
the
antigen
#w is time in terms of hours
#b is the starting position (somewhere in the node or somewhere in the
gap
Dear R-List,
I am trying to develop a tutorial on how to analyze network data from Twitter
conversations for a network analysis class that I teach. I came across the
twitteR package, and saw some examples of it in action on various websites. It
is easy to use, and almost as easy to understand.
May I have a question on how to solve the following problem by R code?
Mainly we want to solve the equation show in the attached image. The equation
is a continuous version of Markov process.
In the equation, we have been able to achieve two things using R code:
[1] From year-2009 sample
I too am unsure what is required, perhaps
xyplot(y~x,data,col=c(3,4),groups=id,pch=c(12,13), type= c(p,r))
a toy dataset would have helped
Perhaps a perusal of
http://lmdvr.r-forge.r-project.org/figures/figures.html
is required
Regards
Duncan Mackay
Department of Agronomy and Soil Science
Hi,
I am looking for an opportunity to make a KS-Test in my C/C++-app.
Unfortunately I am not able to find a lib or function in C or C++ which does
the job. For my other numerical stuff Gnu Scientific Library was recommended
to me. What to do now?
I read that there are options to call R in
On Fri, Jul 22, 2011 at 2:37 PM, john nicholas jbnich...@sbcglobal.net wrote:
Hello,
I would like to implement a turn-of-the-month' trading strategy in R.
Given a daily series of stock market return data as a zoo object, the strategy
would go long (buy) four trading days before the end of
On 07/22/2011 07:51 PM, fongchun wrote:
I am using the glmnet R package to run LASSO with binary logistic
regression.
...
What I am finding is that this optimal lambda value fluctuates
everytime I run glmnet with LASSO.
...
Does anyone know why there is such a fluctuation in the
generation
Hi,
I'd like to read a shapefile into a Map object. This is exactly what
read.shape{maptools} is suppoed to do, according to the documentation I
found in the link below.
However, this doesn't seem to work
library(maptools)x - read.shape(system.file(shapes/sids.shp,
package=maptools)[1])Error:
Dear colleagues, I have a data set that looks roughly like this;
mydat-data.frame(state=c(rep(Alabama, 5), rep(Delaware, 5),
rep(California, 5)), news=runif(15, min=0, max=8), cum.news=rep(0, 15))
For each state, I'd like to cumulatively sum the value of news and make that
put that value in
On Sat, 23 Jul 2011, Axel Urbiz wrote:
Hi,
I'd like to read a shapefile into a Map object. This is exactly what
read.shape{maptools} is suppoed to do, according to the documentation I
found in the link below.
Do search the archives properly; the second hit on googling
list:R-sig-geo
Date: Fri, 22 Jul 2011 20:06:34 -0600
From: abmathe...@gmail.com
To: r-help@r-project.org
Subject: [R] xml2-config issues
I'm trying to install the XML package on Ubuntu 10.10, and I keep getting
a warning message the XML could not be found
Hi Simon,
Is this what you want?
mydat$cum.news-unlist(tapply(mydat$news,mydat$state,FUN=cumsum))
Weidong Gu
On Sat, Jul 23, 2011 at 7:11 AM, Simon Kiss sjk...@gmail.com wrote:
Dear colleagues, I have a data set that looks roughly like this;
mydat-data.frame(state=c(rep(Alabama, 5),
On Fri, 22 Jul 2011, Abraham Mathew wrote:
I'm trying to install the XML package on Ubuntu 10.10, and I keep getting
a warning message the XML could not be found
No, that is not the *error* message you quote below.
and had non-zero exit status. How can I fix this problem?
Install libxml2
On Jul 23, 2011, at 13:11 , Simon Kiss wrote:
Dear colleagues, I have a data set that looks roughly like this;
mydat-data.frame(state=c(rep(Alabama, 5), rep(Delaware, 5),
rep(California, 5)), news=runif(15, min=0, max=8), cum.news=rep(0, 15))
For each state, I'd like to cumulatively sum
On Fri, Jul 22, 2011 at 3:37 PM, john nicholas jbnich...@sbcglobal.net wrote:
Hello,
I would like to implement a turn-of-the-month' trading strategy in R.
Given a daily series of stock market return data as a zoo object, the strategy
would go long (buy) four trading days before the end of
Deal R
,
when I use the package debug, mark a function with mtrace() and enter
into the browser like mechanism of debug a window displaying the code of
the marked function with the current line highlighted usually appears.
When I use GUIs other than ess or the standard R console sometimes
Dear list members,
I am trying to figure out how much CPU time individual commands inside
one of my functions consume. Is it possible to obtain the CPU times of a
whole sequence of commands inside a function? I know how to use
system.time() but this would only give me the time consumed by
Hi:
Try this:
labs - c(abcdef,abcgg,tgthefdk,tgtijuel,tgtnjmoi,gbnt,dlift)
dat - c(0.5,0.25,1,2,16,0.250,4)
dframe - data.frame(labs, dat, stringsAsFactors = FALSE)
dframe$lab2 - factor(substr(dframe$lab, 1, 3))
aggregate(dat ~ lab2, data = dframe, FUN = mean)
lab2 dat
1 abc 0.375000
2
Let say i have a square matrix and applied the 'vech' operator to stack the
lower triangular elements into a vector:
Mat - matrix(1:25, 5)
Mat
[,1] [,2] [,3] [,4] [,5]
[1,] 1 6 11 16 21
[2,] 2 7 12 17 22
[3,] 3 8 13 18 23
[4,] 4 9 14 19 24
xy wrote:
I have like 5.075e-12 , 3.207e-05, 7.438e-07 and 9.393e-08 *** , i dont
know what number they are
http://en.wikipedia.org/wiki/Floating_point
--
View this message in context:
http://r.789695.n4.nabble.com/inside-p-value-e-tp3688961p3689167.html
Sent from the R help mailing
jannis-2 wrote:
I am trying to figure out how much CPU time individual commands inside
one of my functions consume. Is it possible to obtain the CPU times of a
whole sequence of commands inside a function?
See the example under proc.time()
Dieter
--
View this message in context:
zcatav wrote:
If this isn't, a DOS version may be helpfull to run on Android under
dosbox.
Wow, a mind boggling bummer!
Dieter
--
View this message in context:
http://r.789695.n4.nabble.com/R-on-Android-at-least-on-DOS-tp3688847p3689176.html
Sent from the R help mailing list archive
Jochen1980 wrote:
I am looking for an opportunity to make a KS-Test in my C/C++-app.
Unfortunately I am not able to find a lib or function in C or C++ which
does the job. For my other numerical stuff Gnu Scientific Library was
recommended to me. What to do now?
I read that there are
On 23-Jul-11 17:12:09, Megh Dal wrote:
Let say i have a square matrix and applied the 'vech' operator to stack
the lower triangular elements into a vector:
Mat - matrix(1:25, 5)
Mat
_ _ _[,1] [,2] [,3] [,4] [,5]
[1,] _ _1 _ _6 _ 11 _ 16 _ 21
[2,] _ _2 _ _7 _ 12 _ 17 _ 22
[3,] _ _3 _ _8 _
Hello
I wonder whether there is an r tool or package available for testing for the
null of same skewness or kurtosis of two independent samples.
It semes that nsRFA package uses L-moments for soothing similar but I could
not get how to use the package for the above test.
Any pointers,
Hi,
The blunt answer is: by learning R. In particular, you will need pattern
matching techniques as in ?grep and (somewhat advanced, some would call it
basic) knowledge of R. So if you aren't familiar with either, I would
suggest an introductory manual or one of the many websites you find online
Not sure, but I played a little with the progression of w and m, and it
appears that it doesn't take long for their values to converge (i.e.
they don't change any more). Once that happens, D is not going to change.
Further, unless I'm misreading the if {...} indents, you appear to be
If you just want to apply the function over successive columns of a data
frame use
apply(name.of.data.frame, 2 , llik)
Daniel
EdBo wrote:
Hi
I have a code that calculate maximisation using optimx and it is working
just fine. I want to extend the code to run several colomns of R_j where
On Fri, Jul 22, 2011 at 8:00 PM, peter dalgaard pda...@gmail.com wrote:
On Jul 21, 2011, at 23:11 , David Winsemius wrote:
On Jul 21, 2011, at 3:38 PM, zlu wrote:
Hi Peter,
I'm not sure how many people still have 9 month old postings on their mail
client and will know that Peter
On Jul 24, 2011, at 00:20 , Thomas Lumley wrote:
On Fri, Jul 22, 2011 at 8:00 PM, peter dalgaard pda...@gmail.com wrote:
On Jul 21, 2011, at 23:11 , David Winsemius wrote:
On Jul 21, 2011, at 3:38 PM, zlu wrote:
Hi Peter,
I'm not sure how many people still have 9 month old
How about just a stacked bar plot?
barplot(matrix(c(3,5,3),3,1),horiz=T,beside=F)
Tom
On Fri, Jul 22, 2011 at 7:14 AM, Naomi Robbins nbrgra...@optonline.net wrote:
Hello!
It's a shoot in the dark, but I'll try. If one has a total of 100
(e.g., %), and three components of the total, e.g.,
Do
names(bootObj)
to find out what the components are, and use $ or [[ to extract
components.
Do
help(boot)
for a description of components of the object (look in the Value section).
That is general advice in R, applying to all kinds of objects -
boot, and many other functions such as lm(),
50 matches
Mail list logo