Hi everybody,
I have a doubt in relation with arguments in functions when packaging: Does it
make sense the fact of having dots as an argument when it is the only
argument?.
I mean you have a package and a function that will be used directly by the user
has dots as an argument; for example:
Hi there,
I'm wonder if in R there is a way to simulate a discrete Markov chains with
a specific number of occurence of state knowing the transition matrixway.
For example, how to simualte a markov chain of length n with p occurences
(phttps://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read t
As you install basically all CRAN packages and all OSes;
install.packages("forecast")
/Henrik
On Mon, Jan 27, 2014 at 8:18 PM, ce wrote:
> Sorry if the question is stupid, how you you install mac os binaries like in
> :
>
> http://cran.r-project.org/bin/macosx/contrib/r-release/forecast_5.0.t
Sorry if the question is stupid, how you you install mac os binaries like in :
http://cran.r-project.org/bin/macosx/contrib/r-release/forecast_5.0.tgz
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the
Hi,
Try:
Either:
forsentest[1,] <- unlist(forsen[1,])
#or
forsen[] <- lapply(forsen,as.character)
forsentest[1,] <- forsen[1,]
A.K.
On Monday, January 27, 2014 10:38 PM, Tjun Kiat Teo wrote:
I created an an empty data frame this way:
forsentest<-data.frame(matrix(nrow=nod,ncol=f)).
Then
Thanks a lot Michael,
Thats a great help.
Best wishes,
Suparna
Dr. Suparna Mitra
Department of Molecular and Clinical Pharmacology
Institute of Translational Medicine University of Liverpool
Block A: Waterhouse Buildings
1-5 Brownlow Street
Liverpool
L69 3GL
Tel. +44 (0)151 795 5414
M: +44 (0)
I created an an empty data frame this way:
forsentest<-data.frame(matrix(nrow=nod,ncol=f)).
Then I tried to assign one row of another data frame forsen to it
forsentest[1,]<-forsen[1,]
But the factors in forsen gets converted to numbers in forsentest which is
not what I want.
Is there another
Hi Kristi
Jim has given you 1 non ggplot2 solution here is one from lattice
panel.average is a line so added a line for points
# convert site to a factor
dat1$Site = factor(dat1$Site)
datav <- aggregate(Present ~ Site, dat1,mean)
datav
diff(datav[,2]) # test
bw1 <-
bwplot(Present~Site,dat
Hi,
Try ?split()
If `dat1` is the dataset:
lst1 <- split(dat1,dat1$ID)
lst1$an1
# ID V1 mean SD SE
#1 an1 5 72.21719 22.27118 9.092172
#2 an1 6 100.0 NA NA
lst1$an2
# ID V1 mean SD SE
#3 an2 5 79.27999 25.08938 10.2427
#4 an2 6 100.0
Similarly, you can split a large input document into child documents
in knitr, e.g.
<>=
@
You can comment out this chunk when you do not need it. Or control it
programmatically,
<>=
include_me = TRUE # or FALSE
@
<>=
@
Regards,
Yihui
--
Yihui Xie
Web: http://yihui.name
On Mon, Jan 27
On Jan 27, 2014, at 3:13 AM, Kristi Glover wrote:
> Hi R Users,
> I was struggling to overlay two graphs created from the two different dataset
> using ggplot2. Furthermore, I could not join means of the box plots.
>
> I tried this way but did not work. Any suggestions?
> dat1<-structure(list(s
Hi
I use Sweave and have a master Rnw file and parent files.
If there are large chunks I split them up and then just put a % in front of
the \SweaveInput if unwanted.
Otherwise I split up the tex files with \input and \includeonly
You could get into the chunk options and change things there but
I am trying to do the Mann-Kendall, Sen's Slope and Regional Kendall Test
(rkt package) over a 30 year time period spatially.
I have created a raster stack but am unable to figure out how to use the
calc function to do rkt.
This is what I have...
#create vector of years for tests
Years <- c(197
Hi all,
I'm unable to install the package ncdf4 and below is the message that I'm
getting.
Any thougths on how to fix the problem will be very much appreciated.
#
#
* installing *source* packa
In the chunk options, you can use the argument echo = FALSE to
suppress display of the R code in the output.
<< echo = FALSE>>=
# R code
@
This will still print out results from R that would be sent to the
command line (like print() statements, cat() statements, results from
summary(), etc), but th
I've been looking through the R documents to see if there's a way to not
output certain chunks of code. I'm trying to present a document to a team
of folks that won't necessarily be interested in the line-by-line code,
though they are interested in the charts, etc. Thus, I'd like to not output
cert
I **think** this kind of methodological issue might be better at SO
(stats.stackexchange.com). It's not really about R programming, which
is the main focus of this list. And yes, I know they do intersect.
Nevertheless...
Cheers,
Bert
Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374
Hello!
Below, I:
1. Create a data set with a bunch of factors. All of them are predictors
and 'y' is the dependent variable.
2. I run a classification Random Forests run with predictor importance. I
look at 2 measures of importance - MeanDecreaseAccuracy and MeanDecreaseGini
3. I run 2 boostrap run
If you use XLConnect, to can reference the column symbolically to
retrieve the data.
Jim Holtman
Data Munger Guru
What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.
On Mon, Jan 27, 2014 at 4:30 PM, Dustin Fife wrote:
> Hi all,
>
> I freque
On 01/28/2014 03:52 AM, Kristi Glover wrote:
Hi R Users,
I was struggling to overlay two graphs created from the two different datasets
using ggplot2.I could not overlay two figures. I wanted to plot second graph
using second Y axis. but there was no provision.
Furthermore, I could not join mea
Sorry, this should work
fun1 <- function(n){
vec1 <- LETTERS
if(n <=26){
res <- vec1[seq_len(n)]
}
else if(n>26 & n <=702){
res <- c(LETTERS,apply(expand.grid(vec1,vec1)[,2:1],1,paste,collapse=""))[1:n]
}
else if(n >702 & n <=18278){
res <-
c(LETTERS,apply(expand.grid(vec1,vec1)[,2:1],1,past
There seems to be a problem with that function: object 'vec1' not found.
On Mon, Jan 27, 2014 at 4:05 PM, arun wrote:
>
>
> HI,
>
> May be you can try:
>
> fun1 <- function(n){
> if(n <=26){
> res <- LETTERS[seq_len(n)]
> }
> else if(n>26 & n <=702){
> res <-
> c(LETTERS,apply(expand.grid(v
HI,
May be you can try:
fun1 <- function(n){
if(n <=26){
res <- LETTERS[seq_len(n)]
}
else if(n>26 & n <=702){
res <- c(LETTERS,apply(expand.grid(vec1,vec1)[,2:1],1,paste,collapse=""))[1:n]
}
else if(n >702 & n <=18278){
res <-
c(LETTERS,apply(expand.grid(vec1,vec1)[,2:1],1,paste,collapse
Hi all,
I frequently get requests to do data analysis where the person
references an excel column. e.g., "I want to analyze [insert complex
variable name], located at column AAQ in Excel." I've been doing is
gsub and inserting a part of the string for the complex variable name,
then going from th
For that you need to purchase Stat/Transfer.
Frank
hans012 wrote
> Hey Guys
> I have a .sas7bdat file of 1.79gb that i want to read.
> I am using the .sas7bdat package to read the file and after i typed the
> command read.sas7bdat('filename.sas7bdat') it has been 3 hours with no
> result so far.
Dear All,
I can't figure out how to pass multiple arguments to substitute to build up a
call statement. One argument works fine:
>target <- "val1"
> call <- substitute(select(zidx_df, datadate, target), list(target =
> as.name(target)))
> call
select(zidx_df, datadate, val1)
Now
Hi Kristi,
There is a separate ggplot2 mailing list at
https://groups.google.com/forum/#!forum/ggplot2, please post future
ggplot2 questions there.
On Mon, Jan 27, 2014 at 11:52 AM, Kristi Glover
wrote:
> Hi R Users,
> I was struggling to overlay two graphs created from the two different
> data
Although, I got the similar results using AMOC, which should:
cpt
The most probable location of a changepoint if a change was identified or NA if
no changepoint.
Enrico
---
Dr Enrico R. Crema
ERC EUROEVOL Research Associate
UCL Institute of Archaeology
3
It is! I apologize for the noise.
Cheers,
Bert
Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374
"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
H. Gilbert Welch
On Mon, Jan 27, 2014 at 9:48 AM, Brian Ripley wrote:
> I think it is
Folks:
Before I waste someone's time with a stupid bug report, could I get
feedback as to whether the following really appears to be a (minor)
bug?
Summary: get_all_vars does not seem to handle multiple responses correctly.
Example:
> y <- matrix(runif(12),nc=3)
> x <- 1:4
> lmfit <-lm(y~x)
>
Hi R Users,
I was struggling to overlay two graphs created from the two different datasets
using ggplot2.I could not overlay two figures. I wanted to plot second graph
using second Y axis. but there was no provision.
Furthermore, I could not join means of the box plots.
I tried this way but di
Hi Martyn,
Thanks! Should have checked the doc more thoroughly !
Enrico
On 27 Jan 2014, at 16:35, Martyn Byng wrote:
> Hi,
>
> I don't think you are doing anything wrong, the routine is doing what it
> is documented to do, from ?cpt.mean
>
>cpt: Vector containing the changepoint locations
Hi,
I don't think you are doing anything wrong, the routine is doing what it
is documented to do, from ?cpt.mean
cpt: Vector containing the changepoint locations for the penalty
supplied. This always ends with n.
i.e. as your series is of length 50, the last value returned in cpts
will alwa
Dear R-users,
I would like to know whether you know some trick for skipping some of
the steps in the example below (especially the last step in a way that
would make easier to be written succinctly in a text).
I could try to explain in words the whole process, but I'm sure the code
below would
All,
I would like to figure out how to pass variable names to the dplyr function
mutate. For example, this works because hp is one of the variable names on
mtcars:
mutate(mtcars, scale(hp))
Let's says I want to pass in the target variable instead of hard-coding the
name, as follows:
target
Is this what you want:
> random <- expand.grid(R1 = 1:5, R2 = -(1:5))
> result <- cbind(F1 = 10, F2 = 100, random)
>
> result
F1 F2 R1 R2
1 10 100 1 -1
2 10 100 2 -1
3 10 100 3 -1
4 10 100 4 -1
5 10 100 5 -1
6 10 100 1 -2
7 10 100 2 -2
8 10 100 3 -2
9 10 100 4 -2
10 10 100
Hi Bert,
Thanks for the reply.
Here is the snippet from R shell running on top of a kerberos secured hadoop
cluster
=
> Sys.setenv(HADOOP_CMD="/usr/bin/hadoop")
> library(rhdfs)
Loading required package: rJava
HADOOP_CMD=/usr/bin/hadoop
Be sure to run hdfs.init()
> hdfs.init()
> h
Dear List,
I am using the cpt.mean() function in the "changepoint" package to detect
change-points in my data and noticed that when there are no visible changes,
the function returns the last point as the point of change. The following
script can illustrate this:
table(unlist(replicate(500,cpt
I would like to ask how exactly the prediction intervals are calculated by
function predict.arima in R. I suppose that the method is same as for the
function forecast (which I am actually using).
Unfortunately I can not find it anywhere.
I am particularly interested in how it works for Arima models
Dear Team,
I have R and rhdfs installed in a kerberos secured cluster. Whether R and rhdfs
will work with kerberos secured cluster? Is there any reported issues?
Thanks & Regards
Anoop Kumar K M
=-=-=
Notice: The information contained in this e-mail
message and/or attachment
You can use the which.i argument to [.xts:
> is.null(SPY["2009-01-18",which.i=TRUE])
[1] TRUE
Best,
--
Joshua Ulrich | about.me/joshuaulrich
FOSS Trading | www.fosstrading.com
On Sat, Jan 25, 2014 at 9:27 AM, ce wrote:
> Dear all
>
>
> How to test if xts date exists ? is.null doesn't work
Hi Ross --
On 01/23/2014 05:53 PM, Ross Boylan wrote:
[Apologies if a duplicate; we are having mail problems.]
I am trying to understand the circumstances under which R makes a copy
of an object, as opposed to simply referring to it. I'm talking about
what goes on under the hood, not the user
That is not a small reproducible example. There's no r code. Please
read the posting guide to learn how to post to r-help.
-- Bert
Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374
"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
H. Gil
1. Please cc anything but personal remarks to the list, not to me.
That will assure better answers.
2. Your query is too vague for me to be sure -- a small reproducible
example of what you'd like would be very helpful here -- but I am
guessing that you want the ?ave function instead of by().
Chee
Hi all R-users,
I'm trying to using apply function to input a range of values into a
function I wrote.
I wrote a function with 4 information needed. I would like to make 2 of
them fixed and the other 2 random (but with specified values).
I would like to replicate the function 1 times.
I wa
There are a few remaining places on the following three statistics
courses in Coimbra, Lisbon and Elche (Alicante).
Course: Data exploration, linear regression, GLM & GAM in R. With
introduction to R.
Where: University of Coimbra, Coimbra, Portugal
When: 3-7 February, 2014
Course: Intr
Hi R Users,
I was struggling to overlay two graphs created from the two different dataset
using ggplot2. Furthermore, I could not join means of the box plots.
I tried this way but did not work. Any suggestions?
dat1<-structure(list(site = c(1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L,
2L, 2L, 3L, 3L,
Please don't cross-post per R-help posting guide.
The "data" function is not itself data. Provide your data to the function using
the name you assign to it according to the getVarianceStabilizedData function
documentation.
-
48 matches
Mail list logo