Hello again.
Now I have the following:
> xx
[1] "Solve(1 - R/100==(2*y)/1,R)"
> yacas(xx)
expression(list(R == 100 * (1 - 2 * y/1)))
>
I would like to put in a value for y and obtain R.
I've tried more stuff with eval and Eval, but no luck yet.
Any suggestions would be much appreciated.
Solved: it's in the Ryacas vignette:
> yacas("Solve(1-(R/100) == (2*y)/1,R)")
expression(list(R == 100 * (1 - 2 * y/1)))
>
On Tue, Jun 18, 2013 at 11:33 PM, Erin Hodgess wrote:
> Dear R People:
>
> I have the following equation:
> $1 - \frac{R}{100} = \frac{2y}{1}$
> and I was wond
Dear R People:
I have the following equation:
$1 - \frac{R}{100} = \frac{2y}{1}$
and I was wondering if there was a way in R to solve for R (no pun
intended).
I'm experimenting with Ryacas, but nothing yet.
Version R-3.0.1 on Windows 7.
Thanks,
Erin
--
Erin Hodgess
Associate Professor
De
1. Have you googled or binged?
2. Have you tried R Task Views: http://cran.r-project.org/web/views/
(esp. the TimeSeries one) ?
No guarantees, of course.
-- Bert
On Tue, Jun 18, 2013 at 4:08 PM, Jessica Inskip wrote:
> Hi,
>
> I am currently performing heart rate variability analyses on beat-t
On 06/18/2013 04:06 PM, Johnson, Franklin Theodore wrote:
Dear maintainer,
I used bioconductor package, pdInfoBuilder, to make a microarray platform
annotation package.
I named this package, pd.pdinfo.gpl11164.ndf.txt. This "self-made package" is
to be used with oligo package.
Please ask q
Hi,
May be this helps:
set.seed(24)
B101<-
data.frame(SID=sample(400:450,20,replace=FALSE),zGRADE=sample(0:10,20,replace=TRUE),col3=rnorm(20))
set.seed(28)
B2A<-
data.frame(SID=sample(400:600,50,replace=FALSE),zGRADE=sample(0:10,50,replace=TRUE),col3=rnorm(50))
set.seed(35)
B2B<-
data.frame(SID=
Hi,
I am currently performing heart rate variability analyses on beat-to-beat
heart rate data using a non-parametric approach (AR power spectral density).
I am interested in decomposing a AR-spectrum into its components (main
outcomes of interest are the centre frequency and the power of the
bell-
Dear maintainer,
I used bioconductor package, pdInfoBuilder, to make a microarray platform
annotation package.
I named this package, pd.pdinfo.gpl11164.ndf.txt. This "self-made package" is
to be used with oligo package.
Prior to using oligo package, I need to install the annotation package
I have two different data frames ( actually a set of data frames for each
class and one master one into which i want pull some data from each of the
frame in the set)
one is all students that have taken a course
so the set of data frames is
B101
B2A
B2B
B2C
etc. . .
and each one has lots of da
Dear All
wonder if you could provide some insights on the following: currently I have
this code which produces the expected results:
require(deSolve)
pars <- list(k = 0.08,v=15)
intimes <- c(0,0.5,12)
input <- c(800,0,0)
forc <- approxfun(intimes, input, method="constant", rule=2)
derivs <-
Hi All:
I am running R2WinBUGS so that I could automate the running of my
Multivariate Logit Normal model on 300 simulated datasets. The problem I
have is I am not able to read in the data correctly and then code it in the
automation part.
*Heres my model:*
model
{
for (j in 1 : Nf)
{
p1[j, 1:
Dear,
I want to do the following :
#I have created a huge csv.files with 44 colums
#I want to select the specific colums from these files
#CL1 consist data from which I want to compute the histogramms, CL2 is the
cloumn which has numbers that identifies know from which line my second
histogram d
Hi,
How can I read/retrieve the Labels strings of the $variables.label proprety of
a data Frame?
Regards
Lívio Cipriano
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-pr
Hello
Thanks for reply
I want to compute several histograms in a for loop.I am trying to set the
binsize constant in the beginning.
#compute the histograms
for (i in 1:12)
{
binsize <- -20 :20/2
hist(singlefile$GVC(singlefile$new_id[,i], freq = FALSE,xlab ="Graph i",
col = "pink",
Hi,
How can I read/retrieve the Labels strings of the $variables.label proprety of
a data Frame?
Regards
Lívio Cipriano
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-pr
Yes, the bioconductor packages do not install through CRAN. Now that I'm
remembering it, some (maybe all) of the other packages were installed by
dev_tools from github.
I don't know why I was getting that "unable to move temporary installation"
error for Rserve and RCurl, but today it went away a
> I guess I could have been a little more authoritative: the code
> unique(a[sapply(b,function(x) which.min(abs(x-a)))]) is exactly what I need.
That method could be written as the following function
f0 <- function (a, b, unique = TRUE)
{
ret <- a[sapply(b, function(x) which.min(abs(x - a)))
Hello,
Please post to the list, like this the odds for more and better answers
are greater.
I don't understand what you want with
singlefile$GVC(singlefile$new_id[,i]
singlefile$GVC is a function?
How do you plot one single histogram? Post the code and maybe it will
become more clear.
Ru
Hi,
You could also use:
dat1<- data.frame(Vec1,Vec2,Vec3)
Reduce(paste0,lapply(seq_len(ncol(dat1)),function(i) {x1<-
as.character(factor(dat1[,i],labels=c("",LETTERS[i])))}))
# [1] "ABC" "ABC" "" "AC" "AB" "ABC" "A" "B" "ABC" "AC" "B" "A"
#[13] "AB" "C" "B"
#or
library(plyr)
lib
Bert,
I guess I could have been a little more authoritative: the code
unique(a[sapply(b,function(x) which.min(abs(x-a)))]) is exactly what I need.
Thanks for the input, your comments helped us make the code better,
Andras
--- On Tue, 6/18/13, Bert Gunter wrote:
> From: Bert Gunter
> Subjec
Try this
> set.seed(42)
> Vec1 <- sample(0:1, 15, replace=TRUE)
> Vec2 <- sample(0:1, 15, replace=TRUE)
> Vec3 <- sample(0:1, 15, replace=TRUE)
> paste0(ifelse(Vec1,"A",""), ifelse(Vec2,"B",""),
ifelse(Vec3,"C",""))
[1] "ABC" "ABC" """AC" "AB" "ABC" "A" "B" "ABC" "AC" "B"
"A"
[13] "A
Dear all,
Without a loop, I would like transform 3 numeric vectors empty of 0/1 of
same length
Vec1 : transform 1 to A and 0 to ""
Vec2 : transform 1 to B and 0 to ""
Vec3 : transform 1 to C and 0 to ""
to obtain only 1 vector Vec who is the paste of the 3 vectors (Ex : ABC,
BC, AC, AB,...)
An
Hello,
Sorry, I forgot to Cc the list.
Rui Barradas
Em 18-06-2013 16:29, Rui Barradas escreveu:
Hello,
Inline.
Em 18-06-2013 15:54, Dzu escreveu:
Dear all,
I need to create a for-loop in which I can compute multiple histograms
My code is the following :
#singlefile includes huge csv file
#I
Dear all,
I need to create a for-loop in which I can compute multiple histograms
My code is the following :
#singlefile includes huge csv file
#I want to specify the binsize
#I would like to compute in the for -loop the histograms
numfiles <- length(singlefile)
for (i in 1 :51)
{
wer
http://www.newlineoptik.de/ooplepi/fojvlunsrc/lmnfuwv/cghhcy.phpDereje Bacha
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http
Hi Benjamin,
Thanks for pointing that out.
Sorry, didn't read the question carefully.
(0.1%%1)-0.1
#[1] 0
(1.1%%1)-0.1
#[1] 8.326673e-17
(1%%1.1)
#[1] 1
A.K.
From: Benjamin
To: arun
Sent: Tuesday, June 18, 2013 11:33 AM
Subject: Re: [R] Problem with the
Since you set
combined <- NULL
at the top of the function
exists("combined")
will always return TRUE. If you initialize 'combined' to NULL,
use is.null(combined) to see if it is still in its virgin state. If you
don't initialize it to anything then use exists("combined").
In this example yo
Rainer K. SACHS berkeley.edu> writes:
>
> Thanks, that clears everything up completely. It might be worth adding
> your comment to the available documentation.
This request should probably go the maintainer of the expm
package (library("expm"); maintainer("expm")), who may or may
not be readi
Hello,
The first argument to exists() must be the name of an object given as a
character string, as stated in the help page. See ?exists. You have also
forgot to initialize combined to NULL, this time.
Your function revised would then become
c_objects <- function(FILES) {
combined <- NULL
Thanks a bunch. Can't believe I missed that.
-Original Message-
From: Rui Barradas [mailto:ruipbarra...@sapo.pt]
Sent: Tuesday, June 18, 2013 9:57 AM
To: Davis, Brian
Cc: r-help@r-project.org
Subject: Re: [R] Help understanding environments
Hello,
The first argument to exists() must be
Andras:
No.
Using the a = c(1,8,9) and b = 2:3 that ** I posted before**, you get
the single unique value of 1.
Please stop guessing, think carefully about what you want to do, and
**test** your code.
-- Bert
On Tue, Jun 18, 2013 at 7:41 AM, Andras Farkas wrote:
> Bert,
>
> thanks... The valu
Bert,
thanks... The values should not repeat themselves if the same a is closest to
all b, so probably aruns example extended with a unique command works best?
unique(a[sapply(b,function(x) which.min(abs(x-a)))])
thanks,
Andras
--- On Tue, 6/18/13, Bert Gunter wrote:
> From: Bert Gunter
>
Hi,
May be this helps:
set.seed(24)
dat1<- data.frame(ID=1:200,value=sample(c(5:200,NA),200,replace=TRUE))
which(is.na(dat1$value))
#[1] 56 146 184
sum(which(is.na(dat1$value))) #Not clear about the 2nd part of the question
#[1] 386
sum(is.na(dat1$value))
#[1] 3
table(is.na(dat1$value))
#FALSE
T
hank you very much, Bert. Point well taken.
Regards,
Jorge.-
On Wed, Jun 19, 2013 at 12:07 AM, Bert Gunter wrote:
> Jorge: No.
>
> > a <-c(1,5,8,15,32,33.5,69)
> > b <-c(8.5,33)
> > a[findInterval(b, a)]
> [1] 8 32 ##should be 8 33.5
>
> I believe it has to be done explicitly by finding
Hi,
Possibly, R FAQ: 7.31
http://www.hep.by/gnu/r-patched/r-faq/R-FAQ_82.html
(1.1%%1)-0.1
#[1] 8.326673e-17
fun1 <- function(x, y, eps = .Machine$double.eps^0.5) abs(x - y) < eps
fun1(1.1%%1,0.1)
#[1] TRUE
A.K.
0.1%%1==0.1
returns TRUE, which is right
But
1.1%%1==0.1
returns FALSE !!
Jorge: No.
> a <-c(1,5,8,15,32,33.5,69)
> b <-c(8.5,33)
> a[findInterval(b, a)]
[1] 8 32 ##should be 8 33.5
I believe it has to be done explicitly by finding all the differences
and choosing those n with minimum values, depending on what n you
want.
Note that the problem is incompletely spe
In my haste to make a smaller example than my actual code I used 'is.null'
instead of 'exists' as is in my code. Here's a small reproducible example
res <- list(abc=letters, ABC=LETTERS)
save(res, file="results.RData")
res <- list(zyx=rev(letters), ZYX=rev(LETTERS))
save(res, file="results2.RDa
Dear Eliza,
the more unspecific a question is formulated, the more is the poster in an
urgent need for a statistical consultant nearby and -- at the same time --
the less likely is is to get a useful answer on this list ...
I suggest you to read the posting guide, look at CRAN's Task Views an
Hi,
Perhaps this works:
a[sapply(b,function(x) which.min(abs(x-a)))]
#[1] 8 32
A.K.
- Original Message -
From: Andras Farkas
To: r-help@r-project.org
Cc:
Sent: Tuesday, June 18, 2013 8:34 AM
Subject: [R] find closest value in a vector based on another vector values
Dear All,
would y
Dear R community,
I would like to approximate a time serie as linear combination of a set of
many time series, minimizing the number of the time series involved in the
linear combination. Can you recommend to me any method for this? Any paper
about this?
I will appreciate much your suggestions.
Dear Andras,
Try
> a[findInterval(b, a)]
[1] 8 32
HTH,
Jorge.-
On Tue, Jun 18, 2013 at 10:34 PM, Andras Farkas wrote:
> Dear All,
>
> would you please provide your thoughts on the following:
> let us say I have:
>
> a <-c(1,5,8,15,32,69)
> b <-c(8.5,33)
>
> and I would like to extract from
On Mon, Jun 17, 2013 at 7:03 PM, Katharina May
wrote:
> many thanks for the enlightenment - I guess I completely misunderstood the
> na.rm option here...
>
Looking at the help file the na argument seems not suffiiciently well
explained. Will improve.
--
GKX Group, GKX Associates Inc.
tel: 1-877-
Dear All,
would you please provide your thoughts on the following:
let us say I have:
a <-c(1,5,8,15,32,69)
b <-c(8.5,33)
and I would like to extract from "a" the two values that are closest to the
values in "b", where the length of this vectors may change but b will allways
be shorter than "a
Hello,
Where is the problem in this programming. I want two way matrix, but it gives
problem.
The program is given below:
rep = 2
genes = 5
pred = c()
iter = array (dim = c(rep, pred))
pred =
array(dim = c(1, genes))
m = c()
l = 1
w = 1
for(m in
1:rep) {
Dear UseRs,I need to know that is there a way in R for a 3D regression
analysis?i actually have a data in 3 dimensional space showing differences
between regimes in 3D space and i want to do its regression analysis with
another data which is also in 3D space.
thanks in advance for your help,
E
45 matches
Mail list logo