Dear Jim,
I am confused by the function
function(.week)
Generally I have not figured it out yet and in particular, why are you
using "dot" week as in
.week
Is there any significance to the dot?
Thanks,
Bill
On Wed, Jan 22, 2014 at 10:48 PM, jim holtman wrote:
> function(.week)
[[alte
Use a separate R file that is not part of your package that includes any or all
of the R files from your package using full directory path specifications for
debugging. The package is for (mostly) debugged code.
---
Jeff Newm
Ah.. I see your point. That's interesting. Thanks a lot!
But still kind of annoying for debugging, as you still need to source the
code from the other file. Then you need to disable that part when you
install. Need to figure out an elegant way for switching?
On Thu, Jan 23, 2014 at 8:08 PM, Jeff
You keep talking about "including" and "sourcing" and now "dependencies". Stop
that. Don't do it, don't think that. All functions in all R files of a package
are loaded together in one namespace. Your separation of functions between R
files in the package source is entirely for your editing conv
[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 semantics. I'm doing things
that take a lot of memory,
Hi Duncan,
Thanks for replying. I may need to clarify.
What I want is something that can let one R file in a package aware of
another R file in the same package. It does happen a lot in real life, for
example for organizing the functions into separate files, or just because
you need to include a
Hi everyone,
R documents says the safe prediction is implemented, when basis
functions are used, such as poly(), bs(), ns()
This works for univariate basis, but fails in my bivariate polynomial setting.
Can anyone explain the reason?
The following is a small example.
set.seed(731)
x<-runif(300
On Jan 23, 2014, at 3:23 PM, Allison Yoshida wrote:
> Hi,
>
> I am trying to install a package called "biology" in R version 3.0.2 on my
> Macbook Pro. I get a warning message that says "package 'biology' is not
> available (for R version 3.0.2)"
> Upon some research it seems the package was pu
On 14-01-23 7:54 PM, Charlie Xia wrote:
Hi all,
I have a very quick question yet found no answers with google.
Say you when you are writing a package and have R/A.r and R/B.r, if you
want to load B.r in A.r, is there an obvious way to do so?
That question doesn't make sense. You should think
Hi,
we have some sequence data (animal vocalizations) and are wondering if
someone could either confirm that our analysis strategy is sound or shoot
it down (and hopefully make a recommendation for something better). We're
using the *hmm.discnp R* package.
For each individual, we have sequence data
Hi all,
I have a very quick question yet found no answers with google.
Say you when you are writing a package and have R/A.r and R/B.r, if you
want to load B.r in A.r, is there an obvious way to do so?
Thank you!
Charlie
[[alternative HTML version deleted]]
Hi,
I am trying to install a package called "biology" in R version 3.0.2 on my
Macbook Pro. I get a warning message that says "package 'biology' is not
available (for R version 3.0.2)"
Upon some research it seems the package was put together by Logan Murray
who authored an R help book, in which h
On 01/23/2014 04:49 PM, Hervé Pagès wrote:
Hi Mintewab,
With the IRanges packages (from Bioconductor):
> library(IRanges)
> countMatches(z, w)
[1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 0 3 1 1 0 1 0 0 0 0 0 0 1 3
2 0 0 1 0 0
[39] 0 0 0 0 0 0 0 0
And if you don't want to depend on I
Here's a solution:
# This gives a vector of counts (if z is a data frame, first convert
it to a matrix)
res = sapply(as.vector(z), function(x) sum(w==x))
# This copies the dimensions of the variable 'z' to 'res':
dim(res) = dim(z)
Peter
On Thu, Jan 23, 2014 at 7:43 AM, wrote:
>Hi all,
> I
Hi Mintewab,
With the IRanges packages (from Bioconductor):
> library(IRanges)
> countMatches(z, w)
[1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 0 3 1 1 0 1 0 0 0 0 0 0 1 3
2 0 0 1 0 0
[39] 0 0 0 0 0 0 0 0
To install the IRanges package:
source("http://bioconductor.org/biocLite.R";)
Thank you for the reproducible example, but your description is missing a clear
definition of what you want.
For example, if your desired output is
result <- c(rep(0,16),2,1,0,3,1,1,0,1,0,0,0,0,0,0,1,3,2,0,0,1,rep(0,10))
then one answer might be
as.vector(table(factor(w,levels=z)))
--
Hi Luigi
Not sure what you want exactly.
I have cleaned up the formula - do that at the data.frame first.
see http://lmdvr.r-forge.r-project.org/figures/figures.html for more
examples on lattice
Please dput your data - makes things easier and we have what you are working
with
There may be better
Hmisc has had the following updates, with some of the new functions
demonstrated on http://biostat.mc.vanderbilt.edu/HmiscNew . Much of the
new work is motivated by the need to replace tables with graphics.
Changes in version 3.1
Iain Gallagher btopenworld.com> writes:
>
> Hello List
>
> I have been asked to analyse some data for a colleague.
> The design consists of a two sets of animals
>
> First set of three - one leg is treated and the
> other is not under two different conditions (control &
> overload are the sa
Thank you. I ask because our IT people have security concerns with that
functionality
On Thu, Jan 23, 2014 at 10:25 AM, Prof Brian Ripley
wrote:
> On 23/01/2014 16:15, Mark Lyman wrote:
>
>> Can I build a version of R for Windows without some functionality like ftp
>> and sockets? And without so
Hi,
Try ?split()
set.seed(484)
mat1 <-
cbind(rep(1:8,c(2,4,3,6,8,4,3,10)),matrix(sample(200,40*10,replace=TRUE),nrow=40))
res <- split(as.data.frame(mat1[,-1]),as.matrix(mat1[,1]))
A.K.
Hi.
I have very large matrix of 2648 observations by 98 people in a
study. They are covariance matrices fo
On Jan 23, 2014, at 2:27 PM, Ruhil, Anirudh wrote:
> A student asked: Why does R's summary() command yield the Mean and the
> Median, quartiles, min, and max but was written to exclude the Mode?
>
> I said I had no clue, googled the question without much luck, and am now
> posting it to see i
On 01/24/2014 07:27 AM, Ruhil, Anirudh wrote:
A student asked: Why does R's summary() command yield the Mean and the Median,
quartiles, min, and max but was written to exclude the Mode?
I said I had no clue, googled the question without much luck, and am now
posting it to see if anybody knows
On 24/01/14 09:27, Ruhil, Anirudh wrote:
A student asked: Why does R's summary() command yield the Mean and the Median,
quartiles, min, and max but was written to exclude the Mode?
I said I had no clue, googled the question without much luck, and am now
posting it to see if anybody knows why.
Hi,
This is easy to do with the Biostrings package (from Bioconductor).
Let's say you've managed to load the string from your
eya4_lagan_HM_cp.txt file:
my_seq <- "123456789012345678901234567890"
What you call "pairs of positions" are "ranges". Let's say you've
managed to the ranges from you
A student asked: Why does R's summary() command yield the Mean and the Median,
quartiles, min, and max but was written to exclude the Mode?
I said I had no clue, googled the question without much luck, and am now
posting it to see if anybody knows why.
Ani
[[alternative HTML version
dear all,
I set a series of variable subdivided in classes (there are 7 in here,
defined by the clause 'levels'), and I am showing the results in strip
chart using the package 'lattice'. Whitin each class the samples are
further subdivided in "active" (A) and "latent" (L). The function I have
writt
Hello List
I have been asked to analyse some data for a colleague. The design consists of
a two sets of animals
First set of three - one leg is treated and the other is not under two
different conditions (control & overload are the same animals - control leg is
control (!) for treated leg;
Hello Andy,
Do you already understand kde2d output?
if I run
> max(tmp$z)
do I take the maximum value of the 2d density?
Cheers,
Peter
Em quinta-feira, 24 de novembro de 2011 16h12min19s UTC-2, Andreas Klein
escreveu:
>
> Hello,
>
> I am a little bit confused regarding the density values obt
Hi,
Try:
CDS1 <- read.table("CDS coordinates.txt",header=FALSE)
CDS2 <-
split(CDS1[,1],as.numeric(as.character(gl(nrow(CDS1),2,length=nrow(CDS1)
eya4 <- readChar("eya4_lagan_HM_cp.txt",file.info("eya4_lagan_HM_cp.txt")$size)
eyaSpl<- head(strsplit(eya4,"")[[1]],-1)
length(eyaSpl)
#[1] 311522
Many thanks, Arun.
Res 1 is exactly what I wanted.
Mintewab
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of arun
Sent: 23 January 2014 16:27
To: R help
Subject: Re: [R] counting matches in two vectors
Hi,
May be this helps:
z1 <
Hello
I am working with sequential data . Is there any existing R library or code
that would help to determine (or provide the results of statistical tests
for) the most significant or appropriate order of a Markov chain, given a
sequence of discrete states?
For example, given a sequence of discr
Andreas,
You need to install those dependencies first.
That is, ‘lossDev’ is not installed until you first
. first install ‘rjags’, ‘logspline’ but those probably require some other
dependencies as well.
That is, when you try to install ‘rjags’, ‘logspline’
it will probably give you mes
Also,
res3 <- table(z1[match(w,z1)])
identical(res3,res1)
#[1] TRUE
A.K.
On Thursday, January 23, 2014 11:26 AM, arun wrote:
Hi,
May be this helps:
z1 <- factor(z)
res1 <- table(z1[cut(w,breaks=c(-Inf,z,Inf),labels=F)])
res1
#
#-5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
On 23/01/2014 16:15, Mark Lyman wrote:
Can I build a version of R for Windows without some functionality like ftp
and sockets? And without some of the recommended packages? It doesn't look
like this can be done from the Windows install file, but if it can that
would nice to know too.
Installing
> But the last
> part is giving me trouble, since in R calls are by value, not reference,
> so I don't end up modifying the original array in the code below (when
> set_subarray is called):
You can get this effect with R-like syntax by
(a) changing set_subarray to `set_subarray<-`, putting the
Hi,
Try ?merge() or ?join() from library(plyr)
#Please provide reproducible example.
set.seed(42)
dat1 <- data.frame(Stat_Ana=sample(20:30,10,replace=TRUE))
dat2 <- data.frame(Stat_Ana=20:30,Group=LETTERS[1:11])
merge(dat1,dat2,by="Stat_Ana")
library(plyr)
join(dat1,dat2,by="Stat_Ana")
A.K.
Hi,
I am trying to implement a function that would allow functional
transformations of posterior simulations (useful in posterior predictive
checks after MCMC, eg in Stan).
A posterior simulation is a list of vectors and arrays. Usually, one
uses loops to transform it, but that's error prone. I w
psych 1.4.1 is now on CRAN and being distributed to the mirrors.
• Substantial improvements in speed through the use of the parallel package and
some coding improvements in a number of functions.
• Added parallel processing (multicores) to polychoric, tetrachoric,
mixed.cor, fa, fa.parallel, c
Can I build a version of R for Windows without some functionality like ftp
and sockets? And without some of the recommended packages? It doesn't look
like this can be done from the Windows install file, but if it can that
would nice to know too.
Thanks,
Mark
[[alternative HTML version del
Hi,
May be this helps:
z1 <- factor(z)
res1 <- table(z1[cut(w,breaks=c(-Inf,z,Inf),labels=F)])
res1
#
#-5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
# 0 0 0 0 0 0 0 0 0 0 2 1 0 3 1 1 0 1 0 0 0 0 0 0 1 3
#21 22 23 24 25 26 27 28 29 30 31 32
Hi all,
I have the following reproducible example
z<-c(-5:40)
w<-c(11, 11, 12, 14, 14, 14, 15, 16, 18, 25, 26, 26, 26, 27, 27, 30)
r<-z %in% w
now r gives me the presence or absence of elements in z that are in w but I am
interested in getting the number of times each element in z appears (o
Dear R users
Some days ago we released the package 'TAQMNGR'.
The package manages tick-by-tick transaction data, performing 'cleaning',
'aggregation' and 'import' in an efficient and fast way (the package engine
is in C++). Cleaning and Aggregation are performed according to Brownlees
and Gallo (20
That is not a question for R-help (see the posting guide), not a default
build of R (and you show nothing about how you did this) and so not
reproducible.
z_abs looks like a Fortran symbol, so my guess is that libRblas was not
linked correctly. On a Linux system it should be dynamically linke
Dear all,
I tried to install R-3.0.2 Source on a SUSE SLES11 Version and after the
./configure the make command breaks up with
error:
gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2
-I../../src/extra/pcre -I../../src/extra -I../../src/extra/xz/api -I.
-I../../src/include -I../
It is known that logistic regression does not provide maximum of AUC. There
are various approaches to direct AUC optimization but I did not find any of
them in R. Can anybody help me to do AUC maximization in R?
Thanks in advance.
--
View this message in context:
http://r.789695.n4.nabble.com/d
46 matches
Mail list logo