Dear All,
I am using the following model equation:
k*(lambertW_base(b=0,((a)/k)*exp(((a)-z*(t-t0))/k)))
I would like to run this through OpenBUGS, but it does not recognize the
lambert function. Would you have any thoughts on how to re-vrite this equation
matemathically so that it could be
Dear All
I have the following data (somewhat simplyfied):
TINF -1
a -c(500,750,1000,1250,1500,1750,2000)
b -c(8,12,18,24,36,48,60,72,96)
following function:
infcprodessa -function (D, tin, tau, ts)
(D * (1 - exp(-0.048 * tin))/(tin * (0.048*79) * (1 - exp(-0.048 * tau *
exp(-0.048
...@dcn.davis.ca.us wrote:
From: Jeff Newmiller jdnew...@dcn.davis.ca.us
Subject: Re: [R] Loop question?
To: Andras Farkas motyoc...@yahoo.com, r-help@r-project.org
r-help@r-project.org
Date: Saturday, January 26, 2013, 2:09 AM
Please read the Posting Guide
no html email
reproducible example
Dear List,
I have the following code:
x -c(0, 13.8, 38.16667, 62.16667,
85.91667, 108.9167)
y -c(1.77, 2.39, 3, 2.65, 2.62, 1.8)
Interpolated - approx(x, y,xout=0:tail(x, n=1),method=linear)
plot(Interpolated)
in this code x is time in hours
Dear All,
I often have to work with certain models in which I try to reproduce a
distribution the best I can with very little known information avaible. Is
there a package or function in R that could best reproduce a probability
distribution using only the mean, median and SD values availble
Dear All,
I am using the following commands to generate a given dataset:
a -c(0.348,0.007,0.503,0.58,0.21)
cov
-c(0.0448,0,0,0,0,0.0001,0.0001,0,0,0,-0.0055,-0.0005,0.0495,0,0,0.0218,0.0009,-0.0253,0.1103,0,-0.0102,-0.0007,0.00631,0.0067,0.0132)
b -matrix(cov,nrow=5, ncol = 5, byrow =
Dear All,
I have reviewed some examples over the net on this issue, but still not getting
the results. I have the following text and code i would like to place into a
pdf with sweave, but I would like to change the margins on the produced
document. The options(width=60) I guess should do
Dear All,
Â
I have a questions I would like to ask about and wonder if you have any
thoughts to make it work in R.
Â
1. I work in the field of medicine where physiologic variables are often
simulated, and they can not have negative values. Most often the assumption is
made to simulate this
Andras Farkas wrote:
Dear All,
I have a questions I would like to ask about and wonder if you
have any thoughts to make it work in R.
1. I work in the field of medicine where physiologic variables
are often simulated, and they can not have negative values.
Most often the assumption is made
Dear All,
a few weeks ago I have posted a question on the R help listserv that some of
you have responded to with a great solution, would like to thank you for that
again. I thought I would reach out to you with the issue I am trying to solve
now. I have posted the question a few days ago,
Dear All,
is there a function in R that would help me convert a covariance matrix built
based on arithmetic returns to a covariance matrix from log-returns?
As an example of the means and covariance from arithmetic:
mu -c(0.094,0.006,1.337,1.046,0.263)
sigma
Dear All,
thanks to Berend, my question posted yesturday was solved succesfully
here: http://r.789695.n4.nabble.com/hep-on-arithmetic-covariance-conversion-to-log-covariance-td4646068.html .
I posted the question with the assumption of using the results with
rlnorm.rplus() from compositions.
Dear All
I would like to convert matrix rows to columns. I am thinking the t() function
should help, but am having a hard time converting the matrix into the
dimensions I would like them to. Example:
a -matrix(c(1:30),ncol=3) gives me:[,1] [,2] [,3]
[1,]1 11 21
[2,]2 12 22
Dear All
I have the following code for list a:
a -list(structure(c(0, 4, 8, 12, 0, 19.5581076131386, 10.7499105081144,
5.91923975728553, 0, 4.08916328337685, 2.26872955281708, 1.24929641535359
), .Dim = c(4L, 3L), .Dimnames = list(NULL, c(time, y, b
)), istate = c(2L, 107L, 250L, NA, 5L, 5L,
that is exactly what I wanted! Thank you Sarah!
Andras
--- On Tue, 5/21/13, Sarah Goslee sarah.gos...@gmail.com wrote:
From: Sarah Goslee sarah.gos...@gmail.com
Subject: Re: [R] help with data.frame
To: Andras Farkas motyoc...@yahoo.com
Cc: r-help@r-project.org
Date: Tuesday, May 21, 2013
Dear All,
would you please help with the following:
let us say I have:
a -c(0,1,12,13,24,25,36,37)
b -c(6,24.6,27)
#then I extract every 2nd element from a
d -a[seq(1, length(a), 2)]
and what I need help with is to extract the 1st value from d that is greater
than the values in b, so as a
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. So
:
From: Bert Gunter gunter.ber...@gene.com
Subject: Re: [R] find closest value in a vector based on another vector values
To: Jorge I Velez jorgeivanve...@gmail.com
Cc: Andras Farkas motyoc...@yahoo.com, R mailing list
r-help@r-project.org
Date: Tuesday, June 18, 2013, 10:07 AM
Jorge
: Bert Gunter gunter.ber...@gene.com
Subject: Re: [R] find closest value in a vector based on another vector values
To: Andras Farkas motyoc...@yahoo.com
Cc: Jorge I Velez jorgeivanve...@gmail.com, R mailing list
r-help@r-project.org
Date: Tuesday, June 18, 2013, 10:55 AM
Andras:
No.
Using
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 -
Dear All,
I have the following code:
a -rnorm(5000,10,2)
hdr.den(a,prob = c(25, 50, 75,95))
is there a way to change the colors of the horizontal bars representing the
given highest density regions from the current white, green, red and black to
colors of the shades of grey going from lighter
Rui,
package is hdrcde, and thanks for the input,
Andras
--- On Fri, 6/21/13, Rui Barradas ruipbarra...@sapo.pt wrote:
From: Rui Barradas ruipbarra...@sapo.pt
Subject: Re: [R] hdr.den plot colors help
To: Andras Farkas motyoc...@yahoo.com
Cc: r-help@r-project.org
Date: Friday, June 21
Dear All,
wonder if you would provide your insights on the following: the code:
library(lattice)
y -c(1:58)
x -runif(58,5,10)
z -runif(58,8,12)
dataset -data.frame(y,x)
dotplot(y ~ x, data = dataset)
dataset -data.frame(y,z)
dotplot(y~z,data = dataset,col=red)
I would like to overlay the two
dot plots
To: Andras Farkas motyoc...@yahoo.com
Cc: r-help@r-project.org
Date: Friday, June 21, 2013, 4:37 PM
dotplot is a lattice function. add
is an argument to some base
graphics. Never the twain shall meet. There is no add
argument to
dotplot -- did you read the lattice Help for dotplot
Dear List,
please provide some input on the following:
we have
a -c(0,1,2,3)
b -c(4,5,6,7)
d -cbind(a,b)
k -c(0,0,2,2,3,3,2)
k in this case consists of some values of d[,1] in a random sequence. What
I am trying to do is to create an object f that would have the values of
d[,2] in it based on
Dear All
please provide your insigths on the following:
I have:
a -c(1/1/13,15,20)
b -c(1/5/13,15,25)
c -c(1/9/13,15,28)
d -c(2/1/13,18,30)
e -c(2/5/13,18,35)
f -c(2/9/13,18,38)
x -matrix(c(a,b,c,d,e,f),ncol=3,byrow=TRUE)
What I would like to do is to eliminate certain rows of this matrix
Dear All,
using the example from the package scatterplot3d I created a 3d plot as follows:
x -rnorm(500,50,2)
y -rnorm(500,5,1)
z -rnorm(500,6,1)
scatterplot3d(x, y, z, highlight.3d=TRUE, col.axis=blue,col.grid=lightblue,
main=scatterplot3d - 1, pch=20)
I would like to ask if anyone could
Dear All,
wondering if I could get some help on the following using a box-percentile
plotting in Hmisc:
1. how could I put limits on the y axis? the following does NOT seem to work:
bpplot(b,c,d,e,f,g,h, ylim=c(0,2500))
2. I would like to color in each box plot from b to h the line
Dear All,
could you please confirm (or disconfimr, and then please explain:-)) my
understanding of the results generated by the following code:
hdr.den(rnorm(200,55,3))
result:
[,1] [,2]
99% 47.07170 63.26864
95% 48.83670 61.55108
50% 53.04884 57.37916
the way I am
Dear All
I have the following code set up:
Code #1
a -matrix(seq(0,8, by = sign(8-0)*0.25))
b -matrix(seq(8,16, by = sign(16-8)*0.25))
c -runif(1000,50,60)
d -exp(-c*a)+exp(-c*b)
This will give me the obvious error message of lengths not matching. What I am
trying to do here is to have 33
do you want to do with it.
Regards
Petr
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of Andras Farkas
Sent: Wednesday, August 29, 2012 12:25 PM
To: r-help@r-project.org
Subject: [R] Help on not matching object lengths
Dear
dear All
I am trying to plot the following with the x axis on the log scale, but I would
like the original x values to show up as labels:
x -c(0.25,0.5,1,2,4,8,16,32)
y -c(1,1,1,1,0.9,0.8,0.6,0.2)
plot(log(x),y,type=b)
here I would like the labels 0.25,0.5,1,2,4,8,16, and 32 to show on
Dear All,
I have the following code set up:
x -2000
y -8
z -3
I would need to use these numbers to show up in my plot title mixed with
text. The x,y,z numbers would need to change, the text would not. So my title
should look like this
x txt1 y txt2 z txt3
so if:
txt1=hours
txt2=minutes
Dear All,
this is probably an easy one but I can not get a handle on it:
x -c(1,2,3,4,5)
y -c(6,7,8,9,10)
z -15
w -ifelse(z14,x,y)
this will give me a value of 1 for w. What I would like to get is the whole
string of x, so that w would become a numeric object of 5 characters exactly
the
Dear All,
is there a way to set low and high limits to a simulation with rlnorm()?
as an example:
a -rlnorm(500,0.7,1)
I get the summary of
Min. 1st Qu. MedianMean 3rd Qu.Max.
0.1175 1.0590 2.1270 3.4870 4.0260 45.3800
I would like to set limits so that the simulated
Dear All,
I have a matrix with 33 columns and 5000 rows. I would like to find 2 specific
columns in the set: the one that holds the highest values and the one that
holds the lowest values. In this case the column's mean would be apropriate to
use to try to find those specific columns because
Dear All,
I have the following example:
a -matrix(c(1:100),ncol=10)
b -matrix(c(2,4,6,8,10,12,14,16,18,20))
trapz(b,a)
will give me a result of 99, which it seems to me is the AUC of the 1st column
only. Is it possible to get the AUC results by columns of a using the same
b values in the
Dear All,
as a follow up to my previous e-mail (I think I am getting closer...):
I am trying to apply the trapezoidal functions to a matric column by column. I
have the following code:
a -matrix(c(1:100),ncol=10)
b -matrix(c(2,4,6,8,10,12,14,16,18,20))
apply(a,2,function(b,a)
Dear All,
I am working with a Sweave document to be converted into PDF using Rstudio. It
seems to me that my R code will also show up after conversion, which I would
like not to happen. Is there a way to specify a command that I could place on
the beggining and at the end of the R code that
Dear All,
please provide some insights for the following:
we have:
D1 -c(0.2,0.6,0.8)
D2 -c(114,190,304)
IC501 -0.62
IC502 -137.8
ECON -5.95
ALPHA -0.5
M1 -0.84
M2 -0.96
and the equation:
1 =
Frede
Thank you very much for the help. Indeed, I am trying to do exactly what you
wrote the code for. I may have caused some confusion though as a result of a
typographic error in my equation: the result of the equation should EQUAL to
the value of 1. I see you have inputted the equation
Frede
Thank you for the explanation, now I better understand how to write functions
like this,
Andras
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
Dear All,
please help with writing the function for the following:
we have data frame raw
D1 -c(2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10, 20, 20, 20, 20, 20,
50, 50, 50, 50, 50)
D2 -c(0.2, 0.5, 1, 2, 5, 0.2, 0.5, 1, 2, 5, 0.2, 0.5, 1, 2, 5, 0.2, 0.5, 1, 2,
5, 0.2, 0.5, 1, 2, 5)
E
Dear All,
made some headways with my nls model, thanks for the help... I would like to
ask if you could provide some insights to the following:
I am trying to use wfct() from minpack.lm so that I could do the weighting
using one of the predictors, but getting an error message:
Dear All,
please help with the following problem:
I have
t -seq(0,24,by=6)
a -600
g -0.05
b -a*exp(-g*t)
I would like to establish a vector called z (for example) based on b where the
results are calculated as :
z -c(a-b[1],b[1]-b[2],b[2]-b[3],b[3]-b[4],b[4]-b[5])
so the results are:
not homework, but thanks for the hint!
Andras
On Sunday, October 27, 2013 7:51 AM, Patrick Burns pbu...@pburns.seanet.com
wrote:
Homework? A hint is:
?diff
Pat
On 27/10/2013 11:37, Andras Farkas wrote:
Dear All,
please help with the following problem:
I have
t -seq(0,24,by=6
Dear All,
I could use a bit of help here, this function is hard to figure out (for me at
least) I have the following so far:
PKindex-data.frame(Subject=c(1),time=c(1,2,3,4,6,10,12),conc=c(32,28,25,22,18,14,11))
Dose-200
Tinf -0.5
defun- function(time, y, parms) {
dCpdt - -parms[kel] *
Dear All,
#I have the following code
Dose-1000
Tinf -0.5
INTERVAL -8
TIME8 -matrix(c((0*INTERVAL):(1*INTERVAL)))
TIME7 -matrix(c((0*INTERVAL):(2*INTERVAL)))
TIME6 -matrix(c((0*INTERVAL):(3*INTERVAL)))
TIME5 -matrix(c((0*INTERVAL):(4*INTERVAL)))
TIME4 -matrix(c((0*INTERVAL):(5*INTERVAL)))
TIME3
] On Behalf Of Andras Farkas
Sent: Friday, November 30, 2012 12:51 PM
To: r-help@r-project.org
Subject: [R] help on stacking matrices up
Dear All,
#I have the following code
Dose-1000
Tinf -0.5
INTERVAL -8
TIME8 -matrix(c((0*INTERVAL):(1*INTERVAL)))
TIME7 -matrix(c((0*INTERVAL):(2*INTERVAL
I cannot understand what shall the final plot look like.
Regards
Petr
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of Andras Farkas
Sent: Friday, November 30, 2012 12:51 PM
To: r-help@r-project.org
Subject: [R] help
Dear all,
could you please give me some pointers on how I could make R screen for a value
if it falls within a certain range?
I looked at the subset function, but is not doing it, perhaps because I only
have 1 value to screen?
aptreciate the input
ex:
a -16.5
I would like to screen to see
Dear All,
wondering if you know of a good resource on-line to read on interpreting the
parameter estimate result statistics' for the output of a nonlinear regression
model. I am specifically having a hard time finding information on
the interpretation of t value and Pr /t/ in layman terms.
Dear All,
I was wondering if you could help me with the following:
I have the code:
tin -0.5
tau -24
output0 -10
TIMELOW -tin
TIMEHIGH -1*tau
TIME1 -c(seq(TIMELOW,TIMEHIGH, by = sign(TIMEHIGH-TIMELOW)*(tau-tin)/3))
then I would like to calculate:
cp1 -output0*exp(-0.3*TIME1[1])
cp2
Dear All,
Currently I am running the following code:
library(stats4)
library(odesolve)
library(rgenoud)
Input-data.frame(SUB=c(1),time=c(0.5,3,10,15),lev=c(2.05,12.08,9.02,8))
XD-500
IT-3
diffeqfun-function(time, y, parms) {
if(time=IT)
dCpdt - (XD/IT)/parms[Vol] -
Thomas,
thanks for your reply. I will switch to desolve. Unfortunatelly, the
differential equation can not be re-written to an analytical solution in this
case (to the best of my knowledge) because it is a non-linear process, which
may not have an exact analytical solution. Thank you
Dear All,
I made some headways on my ODE problem in R2OpenBUGS, but got stuck again.
Wonder if someone could help on the following:
I am running the following code:
library(R2OpenBUGS)
dosetotal -c(500,250)
z -c(4,2)
grid -c(4,15)
n.grid -2
tol -0.001
dim -2
T -2
origin -0
dosetime
Dear All,
wondering if anyone could help with a working code for the following:
I would like to plot a map using R that includes New York City (with counties
of Kings, Queens, Bronx, New York and Richmond), Westchester, Nassau, Suffolk
and Rockland counties (any color would be ok per county
Dear All,
any thoughts on how I can do the following:
let us say we have:
a -c(2,4,16,28,48)
b -c(10,4,2,0.4,0.03)
d -cbind(a,b)
what I would like to do is to extract values of column b in the matrix based on
the corresponding values of column a. For example: I would like to extract all
Dear All,
another quick question, this one is on skipping part of my code, so let us say:
a -5
b -2
e -0
d -a+b
f -a-b
what I would like to do is to have R NOT to calculate the value for d in case
the value of e equals to zero (essentially skip that chunk), but instead move
on to
To: PIKAL Petr petr.pi...@precheza.cz
Cc: Andras Farkas motyoc...@yahoo.com, r-help@r-project.org
r-help@r-project.org
Date: Wednesday, March 20, 2013, 9:27 AM
On 3/20/2013 8:21 AM, PIKAL Petr wrote:
Hi
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r
Dear All,
sorry, got stuck again on the following: let us say we have:
a -c(1:5)
b -c(6:10)
d -cbind(a,b)
from d I would like to remove total number of rows based on the length of f. So
if:
f -c(1)
my result is working great with the following solution:
d[-length(f),]
so I get:
guys!
Andras
--- On Wed, 3/20/13, Robert Baer rb...@atsu.edu wrote:
From: Robert Baer rb...@atsu.edu
Subject: Re: [R] how to skip part of the code
To: PIKAL Petr petr.pi...@precheza.cz
Cc: Andras Farkas motyoc...@yahoo.com, r-help@r-project.org
r-help@r-project.org
Date: Wednesday, March 20, 2013
Dear All
If you could please help me with a solution on the following:
we have:
a -matrix(c(1,2,3,4,5))
x -matrix(c(0.3,0.2,0.1,0.08,0.05))
b -50*exp(-x[1]*a[1])
d -b*exp(-x[2]*a[2])
e -d*exp(-x[3]*a[3])
f -e*exp(-x[4]*a[4])
g -f*exp(-x[5]*a[5])
I would like to be able to calculate g with
Dear All,
wonder if you have a thought on the following: I am using the round(x,digits=3)
command, but some of my values come out as: 0.07099 AND
0.06901. Any thoughts on why this maty be happening or how to
eliminate the problem?
apreciate the help,
Andras
Dear All,
wondering if someine can access the link to the randsamp code referenced in the
R-help archive here:
http://www.mail-archive.com/r-help@stat.math.ethz.ch/msg75645.html ? I have
tried but for whatever reason I can not get trough. My problem seems to be
similar to what the author
Dear List,
Wonder if you have some thoughts on the following question using lsoda in
desolve:
I have the following data and function:
require(deSolve)
times - c(0:24)
tin - 0.5
D - 400
VÂ Â Â - 26.3
k -0.056
k12Â - 0.197118
k21Â - 0.022665
yini - c(dy1 = 0,dy2 = 0)
 events - data.frame(var
Dear All,
please help with some thoughts on overcoming the following issues, if possible:
#R Code
require(deSolve)
require(FME)
pars - list(k = 0.06,v=18)
intimes - c(0,0.5,12,12.5,50)
input - c(800,0,800,0,0)
forc - approxfun(intimes, input, method=constant)
model - function(pars,
Dear All
I have the following code:
datetime -c(1/1/13 00:00,1/1/13 12:00,1/2/13 00:00,1/2/13 12:00)
datetime -as.POSIXct(datetime,format='%m/%d/%Y %H:%M')
times
Dear List
I would like to ask for some input on the following (here is a simplified
version of the code):
t -t(seq(0,120,by=120/48))
d -500
k -0.1
x -matrix((d/20)*exp(-k*0.9*t))
y -matrix((d/15)*exp(-k*0.7*t))
z-matrix((d/22)*exp(-k*1.1*t))
w-matrix((d/17)*exp(-k*0.2*t))
t
Dear R Expert
allow me to ask a quick qestion: I have a mean value of 6 and a SD of 3
describing my distribution. I would like to convert this distribution into a
log normal distribution that would best describe it when resimulated using log
normal distribution. Currently I am using another
Dear R experts,
I am trying to do linear extrapolation on a dataset like the attached document.
I looked at the approx and approxfun function that seem to do this function,
but not fully understand them. I was wondering if someone could help with
writing commands to do the following based on
Dear experts
I have gotten this far with the question I have posted the other day, but
wonder if someone could help me refine it. The following command will do the
interpolationand plot it for the file attached:
data - read.csv(C:\\Users\\andras\\Documents\\Subject1.csv)
x -data$x
y -data$y
Dear All
please help with the following:
I have:
a -seq(0,10,by=1)
b -c(10:20)
d -cbind(a,b)
f -16
I would like to select the value in column a based on a value in column b,
where the value in column b is the 1st value that is smaller then f. Thus I
should end up with the number 5 because
Dear All,
Happy new year!
wonder if you could help with the following:
we have:
hist(runif(1000,0,100),xlab=expression(AUC[0 - 24]~ (xyz)),ylab=Frequency)
the plan is to have part of the xlab expression change dynamically,
specifically the values of 0 and 24 should be able to update
Dear All,
seeking input (or assurance) that I am using the optFederov in AlgDesign
apropriatelly...
I have:
require(AlgDesign)
c -seq(1,64,by=0.1)
econ=9.16
ic=4.796
hill=1.217
x=5.618
eff -econ-(ic*(c^hill/(x^hill+c^hill)))
cand.list -data.frame(c=c,eff=eff,econ=econ,ic=ic,hill=hill,x=x)
Dear All,
please provide insights into the following problem;
this part is the reproducible example:
library(nleqslv)
S1 -0.5
S2 -0.5
Z -7.2598
M1 --5.7831
M2 -24.597
mk501 -1.2827
mk502 -4.7964
AL --0.5623
f - function(H1){
1 -
Dear All,
wonder if someone could point me in the direction of calculating confidence
intervals for model parameters generated by nlxb() in the nlmrt package?
confint() as is gives the following message: no applicable method for 'vcov'
applied to an object of class nlmrt. appreciate the input,
Dear All
please provide insights to the following, if possible:
we have
E -c(8.2638 ,7.9634, 7.5636, 6.8669, 5.7599, 8.1890, 8.2960, 8.1481, 8.1371,
8.1322 ,7.9488, 7.8416, 8.0650,
8.1753, 8.0986 ,8.0224, 8.0942, 8.0357, 7.8794, 7.8691, 8.0660, 8.0753,
8.0447, 7.8647, 7.8837, 7.8416,
Dear All,
please help with the following if you can:
we have:
simt -seq(0,147,by=1)
simc -50*exp(-0.01*simt)
out1.2 -data.frame(simt,simc)
AUC -c(0,apply(matrix(simc),2,function(x) (diff(simt)*(x[-1]+x[-length(x)]))/2
))
df -cbind(out1.2,AUC)
z -cumsum(rep(24,max(out1.2$simt/24)))
Dear All,
please provide help with the following:
we have
a -c(0,1,1,0,1,0,0,0,0)
b -c(0,0,0,1,0,0,0,0,0)
c -c(1,0,1,0,1,1,0,0,0)
d -c(0,1,0,1,0,1,0,0,0)
df -rbind(a,b,c,d)
df -cbind(df,h=c(sum(a)*8,sum(b)*8,sum(c)*8,sum(d)*8))
df -cbind(df,df[,8]*c(1,2,3,2))
I would like to minimize the value
(1,1,1,1,0,1,0,0,0)df
-rbind(a,b,c,d)df -cbind(df,h=c(sum(a)*8,sum(b)*8,sum(c)*8,sum(d)*8))df
-cbind(df,df[,8]*c(1,2,3,2))
Jean
On Wed, Oct 1, 2014 at 7:30 PM, Andras Farkas motyoc...@yahoo.com wrote:
Dear All,
please provide help with the following:
we have
a -c(0,1,1,0,1,0,0,0,0)
b -c
Dear All,
wonder if you could help with the following:we have:vals - 1:5names(vals) -
paste0(ke,1:length(vals))mp - barplot(vals, ylim = c(0,
6),ylab=expression(paste(Hour^-10)))
In would like to make the numbers (ke1 to ke5, respectively) in the labels of
the x axis a subscript. There is
Dear All,
wonder if you have a thought on the followimg: if I have a simple model like
model <- lm(log(y)~log(x)+log(z),data=data), where both, the dependent and
independent variables are log transformed, is it ok just to use ypred <-
predict(model,type=response) to get the predictions ,
a plot from your plot command? It looks to me as thought
there was an error, perhaps because the plot command tried to treat
"forecast" as a vector.
Jim
On Mon, Mar 20, 2017 at 5:43 AM, Andras Farkas via R-help
<r-help@r-project.org> wrote:
> Dear All
>
>
> wonder if y
color="black",cex=4)+
geom_point(shape=15,aes(x=c(8),y=new_df[,2][8]), color="black",cex=4)+
geom_point(shape=17,aes(x=c(19),y=0.3403275*100), color="black",cex=4)+
geom_point(shape=17,aes(x=c(20),y=0.2973978*100), color="black",cex=4)
as you will see t
)
points(x=as.Date('2017-02-01'),y=0.5)
results in error message :
Error in plot.xy(xy.coords(x, y), type = type, ...) :
plot.new has not been called yet
would you have a solution to plot the point on the plot?
appreiate the help,
Andras Farkas,
__
int(shape=15,aes(x=c(8),y=new_df[,2][8]), color="black",cex=4)+
geom_point(shape=17,aes(x=c(19),y=0.3403275*100), color="black",cex=4)+
geom_point(shape=17,aes(x=c(20),y=0.2973978*100), color="black",cex=4)
as you will see the regresssion line and confidence inte
> [1] 3 3
>
>
>
> Cheers,
>
> Bert
>
>
> Bert Gunter
>
> "The trouble with having an open mind is that people keep coming along
> and sticking things into it."
> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>
>
&
Dear All,
wonder if you could please assist with the following
df<-data.frame(ID=c(1,1,1,2,2,3,3,4,4,5,5),samples=c("A","B","C","A","C","A","D","C","B","A","C"))
from this data frame the goal is to extract the value of 3 from the ID column
based on the logic that the ID=3 in the data frame
Dear All,
wonder if you have thoughts on the following:
let us say we have:
df<-data.frame(a=c(1,2,3,4,5,1,2,3,4,5,6,7,8),b=c(0,1,2,3,4,0,1,2,3,4,5,6,7))
I would like to rewrite values in column name "a" based on values in column
name "b", where based on a certain value of column "b" the
t; b <- c(0:4,0:7)
>> f(a,b)
> [1] 1 1 1 1 1 2 2 2 2 2 2 2 2
>
>
>
>Bert Gunter
>
>"The trouble with having an open mind is that people keep coming along
>and sticking things into it."
>-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
Dear All,
could you please provide input on the following:
plot(1:10,main=paste("\n ","\nABCD","\n","\n","\n"),cex.main=1.3)
a<-500
b<-12
mtext(bquote(bold(.(formatC(1.2*a,decimal.mark=",",digits=2,format="f")))~ "
words "~bold(.(b))~" words"~"\n"~"\n"))
as you
))
#to get 0.33 back...
any suggestions on how I could to that for a data frame?
thank you,Andras Farkas
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting
xample assuming :
k<-c(1:100)
f<-30
ecdf(k)(f)
would give us the value of 0.3... so same idea as this, but instead of "k" we
have data frame "z", and instead of "f" we have "res", and need to find the
value of 0.3... Does that make sense?
m
in your one liner would be the first 4 column values of each row and
"q" is the last (5fth) column value of each row..
thanks again for all the help,
Andras Farkas
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://sta
Never mind, I think i figured:
z<-df
apply(df,1,function(x) approx(sort(x[1:4]), seq(0,1,,length(x[1:4])), x[5])$y)
thanks again for the help
Andras Farkas,
On Friday, June 16, 2017 5:34 AM, Andras Farkas via R-help
<r-help@r-project.org> wrote:
Peter,
thanks,
in your one liner would be the first 4 column values of each row and
"q" is the last (5fth) column value of each row..
thanks again for all the help, Andras Farkas
On Friday, June 16, 2017 4:58 AM, peter dalgaard <pda...@gmail.com> wrote:
It would depend on which one of t
Dear All,
probably a simple enough solution but don;t seem to be able to get my head
around it...example based on a publicly available data set:
mydata <- read.csv("https://stats.idre.ucla.edu/stat/data/binary.csv;)
mylogit <- glm(admit ~ gre + gpa + rank, data = mydata, family = "binomial")
Dear All,
wonder if you have some thoughts on running the with() function (and perhaps
including the pool() function to get the results?) in glmulti? In other words,
how to run glmulti with a data set that is produced by mice()?
publicly available code:
data <- airquality
data[4:10,3] <-
Dear All,
using the example from the help of summary.rms
library(rms)
n <- 1000# define sample size
set.seed(17) # so can reproduce the results
age<- rnorm(n, 50, 10)
blood.pressure <- rnorm(n, 120, 15)
cholesterol<- rnorm(n, 200, 25)
sex<-
1 - 100 of 114 matches
Mail list logo