I have the following list of strings:
name <- c("hsa-miR-555p","hsa-miR-519b-3p","hsa-let-7a")
What I want to do is for each of the above strings
replace the text after second delimiter with "zzz".
Yielding:
hsa-miR-zzz
hsa-miR-zzz
hsa-let-zzz
What's the way to do it?
[[alternative HTM
On Jul 10, 2013, at 12:02 AM, Gundala Viswanath wrote:
> I have the following list of strings:
>
> name <- c("hsa-miR-555p","hsa-miR-519b-3p","hsa-let-7a")
>
> What I want to do is for each of the above strings
> replace the text after second delimiter with "zzz".
> Yielding:
>
> hsa-miR-zzz
>
Hi Arun,
Thanks for the solution it really works !. But how can we avoid even lappy()
and sappy().
Actually any way to do with ts() ?
Thanks,
Antony.
From: arun kirshna [via R] [mailto:ml-node+s789695n467097...@n4.nabble.com]
Sent: Saturday, July 06, 2013 12:54 AM
To: Akkara, Anto
In honor of the kickoff of useR 2013 today, I'm proud to announce the
availability of TIBCO Enterprise Runtime for R (or TERR for short), our new
enterprise-grade, high-performance statistical engine, fully compatible with
the R language.
For more information on TERR, and a link to download the
Try initial fitting with fewer lags; I get a fit to your data with lags=3.
S Ellison
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Diego Ubuntu
> Sent: 06 July 2013 16:09
> To: r-help@r-project.org
> Subject: [R] Kriging
Plz c this link
http://www.mathworks.in/help/images/ref/corr2.html
On Tue, Jul 9, 2013 at 3:43 PM, smriti Sebastian wrote:
> Two dimensional corelation coefficient-2D corelation between (x,y) and
> (x1,y1) where x and x1 are same.
>
>
> On Tue, Jul 9, 2013 at 2:27 PM, peter dalgaard wrote:
>
>
Im doing some text analytic in R and facing some issue on which I need
help.
As a part of the algorithm Ive to generate the *svd matrix* (dimension
reduction) for a large binary matrix (parent). Im using the svd function
for that. The size (memory occupied) of the svd tends to get very large and
Hi
You could use:
gsub("([[:alnum:]]+-)([[:alnum:]]+-)(.*)","\\1\\2zzz",name)
#[1] "hsa-miR-zzz" "hsa-miR-zzz" "hsa-let-zzz"
A.K.
- Original Message -
From: Gundala Viswanath
To: "r-h...@stat.math.ethz.ch"
Cc:
Sent: Wednesday, July 10, 2013 3:02 AM
Subject: [R] Replacing part of del
On Jul 10, 2013, at 13:13 , smriti Sebastian wrote:
> Plz c this link
> http://www.mathworks.in/help/images/ref/corr2.html
>
That's for comparing images. Are your data images?
>
> On Tue, Jul 9, 2013 at 3:43 PM, smriti Sebastian > wrote:
>
>> Two dimensional corelation coefficient-2D corela
Hi,
Please dput() your example dataset.
dat1<- read.table(text="a a a a a b b b c c c c
2 4 5 2 7 2 2 6 3 7 9 3
3 3 4 1 6 8 1 3 5 2 6
3",sep="",header=FALSE,stringsAsFactors=FALSE)
library(reshape)
dat2<-melt(as
Hi,
I want to find a functional form for my data. I have tried smoothing and
obtained a kinda perfect fit.
However, I can only draw it but cannot call it.
I am wondering that is there a way that I can store the fit as a function
and apply it when needed. e.g. tranformation etc.
Many thanks!
Yo
Dear R community,
I was wondering if it is possible to adapt the CCA methodology for three
set of variables. Could you give me some suggestions?
Regards,
Francisco
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEAS
> I want to find a functional form for my data. I have tried
> smoothing and obtained a kinda perfect fit.
> However, I can only draw it but cannot call it.
You'll need to apply the smoothing function to the data separately, store that
and plot the curve (?) fom that.
You can plot a line for man
Hi:
I apologize for posting in the R listserv. But I am trying to do the
following in R.
I am trying to construct Bivariate 95% Approximate Confidence interval for
the mean vector p=(p1,p2) similar to what we have in the univariate case.
[image: \hat p \pm z_{1 - \frac{1}{2}\alpha} \sqrt{\frac{1}
Hi,
I was trying as well as looking for an answer without success (a bit strange
since it should be an easy problem) and therefore I will appreciate you
help:
My simple script is:
# Loadings data of 5 columns and 100 rows of data
data1<-read.csv("C:/…/MyPCA.csv")
pairs(data1[,1:4])
pca1 <- princo
Hello,
I'm an italian student, I've got some problems using R:
After calculating a dbinom() function, my "help.start()" started not to work.
If I type on the console "Help.start", it says me "starting httpd help server
...Errore in stats::runif(10) :
.Random.seed is not an integer vector but o
On 10/07/2013 15:04, Emanuele Belli wrote:
Hello,
I'm an italian student, I've got some problems using R:
After calculating a dbinom() function, my "help.start()" started not to work.
If I type on the console "Help.start", it says me "starting httpd help server
...Errore in stats::runif(10) :
This reply only addresses the NaN in Jacobian matter. I believe it is a
result of getting a perfect fit (0 sum of squares). I have amended the
r-forge version of nlmrt package in routines nlfb and nlxb and did not
get the error running Elizabeth's example. This only answers the
software issue,
It looks like you can if I understand properly. Try this
dat1 <- data.frame(dat1$scores)
dat1$items <- rownames(data1)
ggplot(dat1, aes(Comp.1, Comp.2, colour = items)) + geom_point() +
theme(legend.position="none")
John Kane
Kingston ON Canada
> -Original Message-
> From: a...@w
I have a large function computing an iterative algorithm for fitting mixed
linear models. Almost all code relies on functions from the Matrix package.
I've come across an issue that I do not believe previously occurred in earlier
versions of R or Matrix.
I have a large, sparse matrix, A as
> c
> > The biplot present the data points as numbers. How can I
> present the
> > data point in color (depends on their group-column 5). I
> was thinking
> > about doing it using ggplot2 but I can not succeed. Any
> idea how to do
> > it?
Perhaps the post at
http://www.codesofmylife.com/2012/06
Bonjour,
Je souhaite résoudre le couple d'équation différentielles suivant :
0 = -dA + dB + 2*dC - 2*r1 - 2*r5
0 = dA + dD + r1 + r4
0 = K2 - C/B^2
0 = K3 - D/(A*B)
0 = r5 + 2*r4 - dE
0 = r5 -dI
0 = -r5 - r4 - dG
0 = -r1/2 - dH
en ayant connaissance des valeurs
Hello there,
I want to output ggplot2 graphs(b/c they are pretty) in ASP.NET(C#). Any
one has success or is it feasible to do? Online said R.net is a choice but
said it's not available for R graph. Any suggestions?
[[alternative HTML version deleted]]
I have been confused about the appropriate e-mail address to use to make
announcements to r-help for major package update. In the past I've
submitted to r-packa...@lists.r-project.org without seeing the
announcement appear on r-help.
Thanks for any guidance.
Frank
--
Frank E Harrell Jr Profe
I have zero'd in on what appears to be the issue. This seems to be a bug in
Matrix, but I am not sure yet. I am attaching files that would allow others to
replicate this with my toy data.
Notice the elements of D1 in the attached data are all integers. It is a
sparse, diagonal matrix.
> librar
On 10-07-2013, at 16:21, Raphaëlle Carraud
wrote:
> Bonjour,
>
> Je souhaite résoudre le couple d'équation différentielles suivant :
>
>0 = -dA + dB + 2*dC - 2*r1 - 2*r5
>0 = dA + dD + r1 + r4
>0 = K2 - C/B^2
>0 = K3 - D/(A*B)
>
>0 = r5 + 2*r4 - dE
>0 = r5 -dI
>0
Thank you Marc
Frank
Marc Schwartz-3 wrote
> On Jul 10, 2013, at 1:29 PM, Frank Harrell <
> f.harrell@
> > wrote:
>
>> I have been confused about the appropriate e-mail address to use to make
>> announcements to r-help for major package update. In the past I've
>> submitted to
> R-packages@.
I know how to define replacement functions in R (i.e. âfoo<-â <-
function(x,value) x<-value, etc.), but how do you define replacement functions
that operate on subsets of arrays (i.e. how do you pass an index into foo)?
For example, why does the following use of ârownamesâ work?
> aa <-
On Jul 10, 2013, at 1:29 PM, Frank Harrell wrote:
> I have been confused about the appropriate e-mail address to use to make
> announcements to r-help for major package update. In the past I've submitted
> to r-packa...@lists.r-project.org without seeing the announcement appear on
> r-help.
>
Hi,
Thanks. Fig 4 in the link you provided is what I am looking for.
I still do not know how to implement my data1 and pca1 in the script you
provided as I think it is only a part of a full script.
"
data1<-read.csv("C:/…/MyPCA.csv")
pca1 <- princomp(data1[,1:4], score=TRUE, cor=TRUE)
"
Am I ri
On 10-07-2013, at 20:42, Berend Hasselman wrote:
>
> On 10-07-2013, at 16:21, Raphaëlle Carraud
> wrote:
>
>> Bonjour,
>>
>> Je souhaite résoudre le couple d'équation différentielles suivant :
>>
>> 0 = -dA + dB + 2*dC - 2*r1 - 2*r5
>> 0 = dA + dD + r1 + r4
>> 0 = K2 - C/B^2
>> 0
On Jul 10, 2013, at 11:47 AM, Harry Mamaysky wrote:
> I know how to define replacement functions in R (i.e. ‘foo<-‘ <-
> function(x,value) x<-value, etc.), but how do you define replacement
> functions that operate on subsets of arrays (i.e. how do you pass an index
> into foo)?
> For example,
I am using R studio version 0.97.336.
I am trying to produce multiple figures based on a large data set (98010 rows).
I am creating a plot for each TITLE (related to a variable/station combination).
#Create a plot for each Title. Save all plots as jpegs in folder named
"SkeenaQfigs"
for(i i
Hi,
You could try ?data.table() to further increase the speed:
#Same example:
dt2<- data.table(MyDFNew)
system.time(resNew<- dt2[,lapply(.SD,function(x)
{x1<-which(c(0,diff(x))<0);x1[length(x1)==0]<-0;x1})][1] )
# user system elapsed
# 0.144 0.004 0.148
resNew
# TNH BIX
#1: 7 2
'Sorry I made a mistake . I was using some data of my own and didn't make some
key changes to the script to match your variables.
dat1 <- data.frame(pca1 $scores) # creates the data.frame
dat1$items <- rownames(data1pca1 ) # adds item names
ggplot(dat1, aes(Comp.1, Comp.2, colour = items))
As I understand it rownames(aa) returns a copy of an attribute of aa. So
changing the value of this vector should make the change to the copy of the
row.names attribute. I would then have to set the original row.names equal to
this copy to effect the change.
So my question is why "rownames(aa)[
how about ggbiplot package on github?
On Wed, Jul 10, 2013 at 2:13 PM, John Kane wrote:
> 'Sorry I made a mistake . I was using some data of my own and didn't make
> some key changes to the script to match your variables.
>
>
> dat1 <- data.frame(pca1 $scores) # creates the data.frame
> dat
how about ggbiplot package on github?
On Wed, Jul 10, 2013 at 2:13 PM, John Kane wrote:
> 'Sorry I made a mistake . I was using some data of my own and didn't make
> some key changes to the script to match your variables.
>
>
> dat1 <- data.frame(pca1 $scores) # creates the data.frame
> dat
On Jul 10, 2013, at 12:17 PM, Harry Mamaysky wrote:
> As I understand it rownames(aa) returns a copy of an attribute of aa. So
> changing the value of this vector should make the change to the copy of the
> row.names attribute. I would then have to set the original row.names equal to
> this co
FOAS promotes open access publishing (without costs to the reader and author),
open source software (GPL licensed), and reproducibility of published results.
Currently the only project we financially support is the
-- Journal of Statistical Software http://www.jstatsoft.org,
but we have a num
I think the OP may perhaps want to define a method for "[<-" .
e.g. try:
methods("[<-")
If this is not it ... ??
Cheers,
Bert
On Wed, Jul 10, 2013 at 12:51 PM, David Winsemius
wrote:
>
> On Jul 10, 2013, at 12:17 PM, Harry Mamaysky wrote:
>
>> As I understand it rownames(aa) returns a copy of
So how would I get the following to work?
> aa<-1
> aa
[1] 1
> 'foo<-' <- function(x,value) x<-value
> foo(aa)<-1:10
> aa
[1] 1 2 3 4 5 6 7 8 9 10
> # This doesn't work:
> foo(aa)[4:5] <- c(101,102)
Error in foo(aa)[4:5] <- c(101, 102) : could not find function "foo"
> # What I would like
Dear All,
I would like to use parApply in "parallel" to do parallel computing.
But after I updated to the new version of R, I got the message like
"Warning message: package ‘parallel’ is not available (for R version 3.0.0) "
Any people has the same issue? I know there are some other packages
but w
On Jul 10, 2013, at 3:29 PM, Jie wrote:
> Dear All,
>
> I would like to use parApply in "parallel" to do parallel computing.
> But after I updated to the new version of R, I got the message like
> "Warning message: package ‘parallel’ is not available (for R version 3.0.0) "
> Any people has the
If you define a function 'foo<-' to replace a part of an object you need
to have a corresponding function 'foo' that extracts that same part.
If 'foo' does not exist or if 'foo' extracts something other than what 'foo<-'
alters, then nested replacements will not work.
The expression
bar(foo(x)
Hi,
You could try:
mat1<-matrix(dat3[rowSums(dat3[,2:3])!=dat3[,4],1],ncol=1,dimnames=list(NULL,"MW_EEsDue_ERRORS"))
mat1
# MW_EEsDue_ERRORS
#[1,] 1882
#[2,] 1884
#[3,] 1885
A.K.
#Let's say I have the following data set:
dat3 = data.frame(A_CaseID = c(
Dear John,
Thanks for the help.
I did some minor modifications to your script as I had some problems:
...
pca = PCA(data[,1:4], scale.unit=T, graph=F)
dat1 <- data.frame(pca$scores) # creates the data.frame
dat1$items <- rownames(data$group) # adds item names
ggplot(dat1, aes(pca$ind$coord[
Hi,
Thanks to ssefick for the ggbiplot tip.
It works fine so I submit a general script thats works for future users.
library(ggbiplot)
data<-read.csv("C:/…/MyPCA.csv")
data1<-data[,1:4]
my.pca <- prcomp(data1, scale. = TRUE)
my.class<- data$Group
g <- ggbiplot(my.pca, obs.scale = 1, var.scal
#Let's say I have the following data set:
dat3 = data.frame(A_CaseID = c(1881, 1882, 1883, 1884, 1885),
B_MW_EEsDue1 = c(2, 2, 1, 4, 6),
C_MW_EEsDue2 = c(5, 5, 4, 1, 6),
D_MW_EEsDueTotal = c(7, 9, 5, 6, 112))
dat3
# A_CaseID B_MW_EEsDue1 C_MW_E
Hello,
I would like to use a permanova to analyze my repeated measures,
multivariate data set using the package vegan (adonis function). I
have several explanatory variables and many clinical
biochemistry/hematological response variables (all continuous,
non-normally distributed).
My explanatory
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of bcrombie
> Sent: Wednesday, July 10, 2013 12:19 PM
> To: r-help@r-project.org
> Subject: [R] create new matrix from user-defined function
>
> #Let's say I have the following data
Your question is very vague, so it's hard to know what to suggest.
Please note the exhortation that appears at the bottom of every
r-help message:
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
It
Hi,
I have had a look at the manual but it makes no sense to me. I have
downloaded RTools, and the InnoSetup,
but I don't understand how to use these to install my package? Am I
meant to be writing commands
in R itself, or in these other things I've downloaded?
Lucy
>>> Erin Hodgess 9/07/2013 5:3
Lucy, you have stepped into something of a mess. Although you just want to
install the package to use it, installing from source often (but not always)
requires the ability to compile C, C++, or Fortran, and discussions about
development really belong on the R-devel mailing list. The steps neede
On Jul 10, 2013, at 4:37 PM, Lucy Leigh wrote:
> Hi,
> I have had a look at the manual but it makes no sense to me. I have
> downloaded RTools, and the InnoSetup,
> but I don't understand how to use these to install my package? Am I
> meant to be writing commands
> in R itself, or in these other
Hi,
I have for many years build R from source for Linux. I have just run
into my first problem with this in ... I don't know how long.
uname -a
Linux douglas 3.2.0-4-686-pae #1 SMP Debian 3.2.46-1 i686 GNU/Linux
cat /etc/issue
Debian GNU/Linux 7 \n \l
The version of R is 2.15.3. I know it i
Hi,
I guess the error message:
> vmask(lat,lon,time,vmax=25)
Error en vmask(lat, lon,
time, vmax = 25) : objeto 'lat' no encontrado
says that you have not defined the object 'lat'.
time<-subset(Geo, select =date)
time[,1]<- as.POSIXct(time[,1],format="%d/%m/%Y %H:%M")
location<- subset(Geo,sel
Got it. Thank you for the explanation. And thanks to everyone for their
help.
On Wed, Jul 10, 2013 at 5:09 PM, William Dunlap wrote:
> If you define a function 'foo<-' to replace a part of an object you need
> to have a corresponding function 'foo' that extracts that same part.
> If 'foo' doe
Hi,
I have a matrix whose columns are named as "in" and "out". Then I coerce
it to be a data.frame. However the system seems to forbid me from using the
name "in", but I am not aware of it until I call it by the dollar sign $.
Is there something R should remind me but it does not?
Is there any
Hello,
"in" is a reserved word.
?Reserved
Hope this clarifies,
Pascal
2013/7/11 jpm miao
> Hi,
>
>I have a matrix whose columns are named as "in" and "out". Then I coerce
> it to be a data.frame. However the system seems to forbid me from using the
> name "in", but I am not aware of it
Just wonder why R does not remind me so when I use it as a dimname...
2013/7/11 Pascal Oettli
> Hello,
>
> "in" is a reserved word.
>
> ?Reserved
>
> Hope this clarifies,
> Pascal
>
>
>
> 2013/7/11 jpm miao
>
>> Hi,
>>
>>I have a matrix whose columns are named as "in" and "out". Then I
>>
Hello,
You can offer your help to develop a built-in function designed to
internally check the use of reserved words.
Or, citing the help page:
"Reserved words outside quotes are always parsed to be references to the
objects linked to in the Description, and hence they are not allowed as
syntac
I have found a solution to the repeated seg-faults below.
If I set environment variables:
setenv CFLAGS -O2
setenv FFLAGS -O2
rather than the default -O3, then R builds and "checks" successfully.
A few more details about the Debian system on which I have been building:
gcc (Debian 4.7.
Hello,
Maybe the reason why:
http://www.cran.r-project.org/doc/manuals/R-admin.html#Compilation-flags
Regards,
Pascal
2013/7/11 Mark Dalphin
> I have found a solution to the repeated seg-faults below.
>
> If I set environment variables:
>setenv CFLAGS -O2
>setenv FFLAGS -O2
> rather
Hi all,
Currently I am working on a code that will calculate word occurrence rate
in a tweet.
First, I have 'tweets' that contains all the tweet I grabbed and I make
'words' that contains all unique word in 'tweets'.
After that I use sapply to calculate probability of a word appearing in
'tweets'.
On 11/07/2013 01:22, David Winsemius wrote:
On Jul 10, 2013, at 4:37 PM, Lucy Leigh wrote:
Hi,
I have had a look at the manual but it makes no sense to me. I have
downloaded RTools, and the InnoSetup,
but I don't understand how to use these to install my package? Am I
meant to be writing comma
On 11/07/2013 06:44, Pascal Oettli wrote:
Hello,
Maybe the reason why:
http://www.cran.r-project.org/doc/manuals/R-admin.html#Compilation-flags
And since this is a ix86 system, you really should be using -mtune=native.
I do not believe the default in 2.15.3 was -O3: it is not in current R,
Hello again,
I was wondering if it is possible to install OpenBLAS linear algebra
library in R running under windows.
I found some study saying working with OpenBLAS would significantly
speed-up the calculations in R.
Thanks for your pointer.
Thanks and regards,
[[alternative HTML vers
68 matches
Mail list logo