All your questions are answered by the knitr book in my first reply,
which introduces knitr in a systematic manner. For the web pages, I
have tried my best, and nobody can make everybody happy. I do not
understand why you do not understand Rnw and markdown, and I do not
quite believe a person who u
Dear r-users,
I would like to construct tem and leaf plot using iris data. It should be
easy, but I don't understand why the plot is not right.
Thank you so much for your help.
dat <- iris[,1] > stem(dat) The decimal point is 1 digit(s) to the left of the
| 42 | 0 44 | 46 | 00 48
Dear R-experts!
I did an experiment with Guppy where I had two dietary groups ("High" and
"Low"). I completed all my data analysis, but stacked in "paternity
analysis". I ran the attached model to analyse them, but as a novice in R,
it's very hard for me to confirm whether this gives me the correc
Hi Mike,
As long as you have access to some user folder, you can download a
non-install version of RStudio.
Go to the page http://www.rstudio.com/ide/download/desktop and select "Show
zip/tarball downloads", download, extract, and run.
Do believe Yihui that running an example using RStudio saves yo
Hi,
@Yihui
When I am using a public computer, say university computer lab or
financial company. I do not have control what to install.
I'm also very happy with R editor on OS X, it integrates with Mac
well. As for my Mac Air, I am keeping installation to the minimal.
There are a lot links on yo
I imagine that most readers of this list will put your question in the
too hard basket.
That being so, here is my inexpert take on the question.
The issue is to estimate the uncertainty in the estimated difference of
the means.
This uncertainty depends on the nature of the serial dependence
Hello,
First of all, you need to read the posting guide.
Where is a data example? And code?
As for the question, at an R prompt, type ?log.
Hope this helps,
Rui Barradas
Em 18-07-2013 20:18, Munroe, Ryan escreveu:
Hi,
I ran a linear regression on a data set and got an Rsq of about .27. The
Hi,
I ran a linear regression on a data set and got an Rsq of about .27. The plot
looks as though an exponential curve would be a better fit. What codes do I use
to do this?
Thank you,
Ryan Munroe
[[alternative HTML version deleted]]
__
R-he
Wow. That is exactly what I wanted (thread viewers see output below). I
think/hope this script will be more user friendly for my needs (RTF final
output) than the loop I currently have for LaTex output. Thanks very much A.K.
Iâll need to send you a Bundt cake at some point I suppose⦠BN
Hi Mike,
if you browse the folders, you find always the Rscript binary (the executable)
under /Library/Frameworks/R.framework/Versions/.../Resources/Rscript.
Do not forget to give your tex file the extension .Rnw! Then surround each
Rcode with <>= Here your r code as you do it in the R shell .
I recommend RStudio not because I want to promote it in any sense, but
because of the fact that it has the best support for Rnw/knitr at the
moment, and it will save you a lot of headache to get started. It
seems you just do not believe me, and insist on going through all the
low-level configuratio
On 18.07.2013 20:23, Christofer Bogaso wrote:
Hi Simon,
Thanks for your pointer.
However could you please explain what 'function(x, file_Path)
standardGeneric("save")' means here?
It is the definition of the generic function for save()?
The underlying help files look quite
rocket science
On 18-07-2013, at 22:22, C W wrote:
> Thanks, Simon. I would never figured it out!
>
> I apologize if I sound frustrated, because I am.
>
> @package author: you have a great package, but I think a lot of the
> directions are hand waving. For the newbies, this leads to more
> confusion.
>
>
Thanks, Simon. I would never figured it out!
I apologize if I sound frustrated, because I am.
@package author: you have a great package, but I think a lot of the
directions are hand waving. For the newbies, this leads to more
confusion.
@Berend: I am using OS X.
Mike
On Thu, Jul 18, 2013 at
On 18-07-2013, at 22:09, C W wrote:
> http://tex.stackexchange.com/questions/85154/knitr-with-texworks/85165#85165
>
> In step 3: "add the executable file (step 3)".
>
> What is the executable file? Locate package knitr directory path in R?
>
>From the window: Executable ==> Program. So th
The executable is in case of knitr always Rscript.
On a mac it is simply Rscript on windows it is Rscript.exe. This should be on
your PATH. If you are not sure, open the Mac Terminal and type Rscript
--version. If it does not say "Command not found" all is fine.
Best
Simon
On Jul 18, 2013, at
http://tex.stackexchange.com/questions/85154/knitr-with-texworks/85165#85165
In step 3: "add the executable file (step 3)".
What is the executable file? Locate package knitr directory path in R?
Mike
On Thu, Jul 18, 2013 at 3:56 PM, C W wrote:
> Actually, I see it at the bottom. Sorry!
>
> O
Actually, I see it at the bottom. Sorry!
On Thu, Jul 18, 2013 at 3:44 PM, C W wrote:
> Hi Simon,
> I am on OS X Lion, I have TeXworks, I don't have knitr as an option.
>
> How do I install that into TeXworks? Seems like I have to something
> in terminal?
>
> Mike
>
> On Thu, Jul 18, 2013 at 3:3
Hi Simon,
I am on OS X Lion, I have TeXworks, I don't have knitr as an option.
How do I install that into TeXworks? Seems like I have to something
in terminal?
Mike
On Thu, Jul 18, 2013 at 3:31 PM, Simon Zehnder wrote:
> Hi Mike,
>
> I found my way with this little blog: http://yihui.name/knit
Hi Mike,
I found my way with this little blog: http://yihui.name/knitr/demo/editors/
The .Rnw files are created very well in a Latex editor. Everything else can be
easily googled. The command via knitr::knit2pdf works very fine if you use the
chunks. If you are trying to compile an Rtex file, t
Hi Christofer,
R's S4 class system builds on generics, that is one class defines the raw frame
of a function and maybe an own distinct implementation and other classes, that
(usually) inherit from this class, set their special implementations of it.
Consider a generic function in R as being an
Hi Mark,
This is very helpful!!
Much appreciated
Sent from my iPad
On Jul 19, 2013, at 3:51 AM, Mark Leeds wrote:
> Hi George: Assuming it's still relevant, the link below will explain why.
>
> http://www.stat.pitt.edu/stoffer/tsa2/Rissues.htm
>
>
>
> On Thu, Jul 18, 2013 at 2:14 PM, Georg
Hi,
I am not able to extract variance and covariance
As mentioned, there are 5 stocks and changed the code [
http://www.forecastingfinancialrisk.com/3.html] as follows:
> S<-cov(returns)
> S
V1 V2 V3 V4 V5
V1 0.0004951526 0.0001256519 0.0
Hi R folk,
I have a time series of scalar downstream velocity data measured across a tidal
channel. The variables are the locations in bins across the channel, the
samples are over time.
The fluctuation over the tide cycle is an enormous fraction of the time
variation in the data ... 96%. The s
Here's one way:
Vec <- rnorm(30)
Vec.cut <- cut(Vec, breaks=c(quantile(Vec, probs = seq(0, 1, by = 0.20))),
labels=c("0-20","20-40","40-60","60-80","80-100"), include.lowest=TRUE)
table(Vec.cut)
or determine the breaks automatically:
cut.size <- function(x, size) {
cut.prob <- size/leng
How do you create a .Rnw file, in R or LaTex? I don't think any
tutorial mentions it.
btw, I am very new to the terms like markdown, so I don't understand
"markdown to HTML".
I am reading here http://biostat.mc.vanderbilt.edu/wiki/Main/KnitrHowto
that you need to compile at terminal. I do not k
Hi George: Assuming it's still relevant, the link below will explain why.
http://www.stat.pitt.edu/stoffer/tsa2/Rissues.htm
On Thu, Jul 18, 2013 at 2:14 PM, George Milunovich <
george.milunov...@mq.edu.au> wrote:
> Dear all,
> When I run an arima(1,1,1) on an I(1) variable, y, I get different
Dear all,
When I run an arima(1,1,1) on an I(1) variable, e.g. y, I get different
estimates to when I first difference the variable myself, e.g y2<-diff(y),
and then run arima(1,0,1) on y2. Shouldn't these two approaches give the
same output?
Any help will be much appreciated.
george
--
View thi
I'm not sure what your question really is. You do not have to use
RStudio, but it will be much easier to get started with RStudio,
because it does a lot of automatic conversion behind the scenes (e.g.
tex to PDF, markdown to HTML, ...). If you want a "pure" solution
without any text editor support,
Hi Simon,
Thanks for your pointer.
However could you please explain what 'function(x, file_Path)
standardGeneric("save")' means here? The underlying help files look quite
rocket science for me!
Thanks for your time.
Thanks and regards,
On Thu, Jul 18, 2013 at 4:32 PM, Simon Zehnder wrote:
>
Thanks
Sent from my iPhone
On 19/07/2013, at 1:43 AM, "Prof Brian Ripley [via R]"
wrote:
> On 18/07/2013 16:14, george wrote:
> > Dear all,
> > Does anyone know if it is possible to estimate restricted arima models
> > using
> > the arima command in R? For instance lets say I want arima(6,
Dear all,
When I run an arima(1,1,1) on an I(1) variable, y, I get different estimates to
when I first difference the variable myself, e.g y2<-diff(y), and then run
arima(1,0,1) on y2. Shouldn't these two approaches give the same output?
Any help will be much appreciated.
george
Hi everyone,
I am using package knitr, FIRST TIME. I don't have access to RStudio.
Read through Yihui's page, didn't find it helpful. Stuck on terms
Rnw, GFM (GitHub Flavored Markdown). Never used Sweave, so the
reference is not helping.
Is there a simple step-by-step example WITHOUT RStudio?
On Jul 18, 2013, at 9:02 AM, Jason wrote:
> How do I change my email settings? I would like to limit the emails that I
> receive to only those of interest.
>
You can use various search engines. I like the MarkMail option. It allows me to
search in various r-related groups. If you wnat to run
On 18/07/2013 16:14, george wrote:
Dear all,
Does anyone know if it is possible to estimate restricted arima models using
the arima command in R? For instance lets say I want arima(6,0,0) but where
the first three ar parameters are restricted to zero, ie. ar(1)=ar(2)=ar(3)
= 0, and only the last
Hello,
Take a look at parameter 'fixed' of function arima. From the help page
for arima():
"fixed
optional numeric vector of the same length as the total number of
parameters. If supplied, only NA entries in fixed will be varied."
Example use ('fixed' has length 7 because we must cou
Go to Settings | Filters in Gmail and set filters to delete
the r-help messages you don't want or move them to a folder
for review. R-help messages are not tagged so you cannot
restrict them before they are sent.
-
David L Carlson
Associate Professor of Anthro
I am guessing that you are trying to use the densityplot function from the
lattice package (if you had followed the posting guidelines and told us
which package you were using, then we would not need to guess).
If that is the case then you are trying to mix base graphics (mfrow) and
grid graphics
How do I change my email settings? I would like to limit the emails that
I receive to only those of interest.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/po
Greg,
Good catch. My recollection was that the vector would be broken up into
'breaks' groups of equal size, however it is range(x) that is split into
'breaks' intervals, each of which is equal width.
Thanks,
Marc
On Jul 18, 2013, at 10:55 AM, Greg Snow <538...@gmail.com> wrote:
> Marc,
>
The p-value and inference is the same, the only difference that I see is
the value of the W statistic. The definition of the W statistic (as
discussed in the Note section on the help page) is based on the sum of the
ranks in the **First** group, so if you change which group is first then
you shoul
my fault. qcut() is a python function in pandas ;-)
what i meant is cut2() in hmisc.
sorry for messing up.
On Jul 18, 2013 11:51 AM, "Greg Snow" <538...@gmail.com> wrote:
> Wensui,
>
> ?qcut on my machine gives an error and ??qcut does not find anything in
> the installed packages. Which packa
The short answer is whichever version you want since they are
the same. Look at the t-test results, they are also different.
In one t is positive and in the other it is negative. That is
just a result of whether the smaller mean is subtracted from
the larger mean or vice versa. The same is happenin
Marc,
Your method works fine when the data is perfectly uniform, but try it with
"Vec <- rnorm(30)" and you will see that there are more observations in the
middle groups and fewer in the tail groups. Something like quantile needs
to be used to find the unequally spaced breaks that will give equa
Wensui,
?qcut on my machine gives an error and ??qcut does not find anything in
the installed packages. Which package is qcut in?
On Wed, Jul 17, 2013 at 4:43 PM, Wensui Liu wrote:
> ?qcut
> On Jul 17, 2013 5:45 PM, "Witold E Wolski" wrote:
>
> > I would like to "cut" a vector into groups o
Dear all,
Does anyone know if it is possible to estimate restricted arima models using
the arima command in R? For instance lets say I want arima(6,0,0) but where
the first three ar parameters are restricted to zero, ie. ar(1)=ar(2)=ar(3)
= 0, and only the last three are actually estimated.
Any he
Dear list,
Im an undergraduate research assistant trying to create a single function
that can calculate Morans I using the ape package. The example that I
will use comes from online data about ozone levels. Here are the commands
that I have been using:
> library(ape)
> ozone<-read.table("ht
If you read ?dist, it says that:
binary:
(aka asymmetric binary): The vectors are regarded as
binary bits, so non-zero elements are ‘on’ and zero elements
are ‘off’. The distance is the proportion of bits in which
only one is on amongst those in which at least one is on.
The short answer is t
Dear all:
I want to ask question about "binary" distance measure. As far as I
know, there are many binary distance measures,eg, binary Jarcad distance,
binary euclidean distance, and binary Bray-Curtis distance,etc. It is even
more confusing because many have more than one name. So , I wan to k
Hello,
I have the following data.frame
structure(list(Study = structure(c(1L, 2L, 3L, 4L, 5L, 6L, 7L,
8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L,
2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L,
16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L,
11L, 1
Hi, Peter. Thanks for the suggestion. I will investigate ?merge. BNC
From: Peter Alspach-2 [via R] [mailto:ml-node+s789695n4671809...@n4.nabble.com]
Sent: Wednesday, July 17, 2013 8:08 PM
To: Crombie, Burnette N
Subject: Re: combine select data from 2 dataframes sharing same variables
Tena koe
Hi all:
My data:
f1 f2 f3 f4 y
1 -4.45 3 6.44 3.721
2 25.66 121 39.03 3.55 0
3 -9.75 12 11.77 3.40 1
4 -12.09 17 13.75 3.33 0
5 -3.53 4 6.47 3.24 0
6 13.18 69 26.55 3.201
... ...
I want to plot f1 for y=0 and 1; f2 for y=0 and 1...and the same as
Haha, true true! ;)
It was to be used as a measure on how good the models I use are, but I found
out that the AIC would be much easier to implement, and as I understand, a
better measure of how good the model fit.
Thanks,
Chris
--
View this message in context:
http://r.789695.n4.nabble.com/R-
Good day all,
My first posting to this list. It looked like the best place to post this
question.
When running the wilcox.test(), I noticed that the output values change if
you change the ordering of the levels (example below which includes a
t.test for comparison). I think this has something to
> Dear all
>
> I have one question that I struggle to find an answer:
>
> Let`s assume I have 2 timeseries of daily PnL data over 2 years coming from 2
> different trading strategies. I want to find out if strategy A is better than
> strategy B. The problem is that the two series have serial co
HI,
#dat1: data
Combn1<-combn(colnames(dat1)[2:5],2)
#For the first part, may be this helps:
library(plyr)
res<-lapply(split(Combn1,col(Combn1)),function(x)
{x1<-cbind(Var1=colnames(dat1[,x])[1],Var2=colnames(dat1[,x])[2],dat1[,x],Method=dat1[,6]);colnames(x1)[3:4]<-
c("V1","V2"); ddply(x1,.(Met
Hi,
m1<- matrix(NA,5,5)
m1[upper.tri(m1)]<-c(2,3,8,4,9,14,5,10,15,20)
One way would be:
m1[lower.tri(m1)]<-t(m1)[lower.tri(t(m1))]
m1
# [,1] [,2] [,3] [,4] [,5]
#[1,] NA 2 3 4 5
#[2,] 2 NA 8 9 10
#[3,] 3 8 NA 14 15
#[4,] 4 9 14 NA 20
#[5,]
On 18/07/2013 10:37, ONKELINX, Thierry wrote:
Dear all,
I am running the same model on several datasets, each dataset is a different
species. The problem is that for some datasets the model is not converging.
Currently I have an INLA model running for 35 days and still no results. The
process
On 07/18/2013 03:47 AM, Simon Zehnder wrote:
Hi Christopher,
I think, that "save" is no generic function like "plot", "show", etc. So at
first you have to determine a generic.
setGeneric("save", function(x, file_Path) standardGeneric("save"))
The implementation offered by Christofer shows wr
Hi Henrik,
That is exactly what I was looking for.
Thanks a lot.
Best regards,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Hi Christopher,
I think, that "save" is no generic function like "plot", "show", etc. So at
first you have to determine a generic.
setGeneric("save", function(x, file_Path) standardGeneric("save"))
Now your definition via setMethod.
Best
Simon
On Jul 18, 2013, at 12:09 PM, Christofer Bog
See evalWithTimeout() of R.utils, e.g.
tryCatch({
evalWithTimeout({
slowFunction();
}, timeout=7*24*3600);
}, TimeoutException=function(ex) {
cat("Timeout. Skipping.\n");
})
help("evalWithTimeout") have more information and cross links.
/Henrik
On Thu, Jul 18, 2013 at 11:37 AM, ONKELI
Hello again,
I am trying to define the 'save' method for my S4 class as below:
setClass("MyClass", representation(
Slot1 = "data.frame"
))
setMethod("save", "MyClass", definition = function(x, file_Path) {
write.table(x@Slot1
Maybe you can use "round" and "trunc" functions
For example if you have a vector like this:
x<- c(3.000 3.125 3.250 3.375 3.500 3.625 3.750 3.875 4.000)
and you want to round the numbers to 2 decimals you can use:
round(x,2)
[1] 3.00 3.12 3.25 3.38 3.50 3.62 3.75 3.88 4.00
if you want a n
Please reply to the list. You will have more chance to get an answer.
Pascal
2013/7/18 G Girija
> Hi,
>
> Many thanks for your hint. Yes I made a mistake there.
>
> Also could you *please* help me in rectifying the following also?
>
> I am not able to extract variance and covariance
>
> As m
Dear all,
I am running the same model on several datasets, each dataset is a different
species. The problem is that for some datasets the model is not converging.
Currently I have an INLA model running for 35 days and still no results. The
process still uses near 100% of the CPU and less than 1
Hi,
Do you know any function/package in R which returns all possible paths in a
graph.
Thanks
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guid
67 matches
Mail list logo