Displaying 20 results from an estimated 52 matches for "fr2".
Did you mean:
cr2
2008 May 18
1
plot a function with a vector as argument
...ied to define a function using another function I defined before, and the
previous function has a vector as an argument, when I tried to get the graph
of the new function, there was something going wrong. Here is a simple
example to explain how it happend:
fr1 <- function(x,y){
x^2+x*y+1
}
fr2 <- function(x){
fr1(x,3)
}
plot(fr2)
In this case, it worked just fine. But when I changed it to the following
form:
Fr1 <- function(x){
x1 <- x[1]
x2 <- x[2]
x1^2+x1*x2+1
}
Fr2 <- function(x){
Fr1(c(x,3))
}
plot(Fr2)
it gives:
Error in xy.coords(x, y, xlabel, ylabel,...
2003 Jun 25
3
joining columns as in a relational database
...AchSchool, "School", which = "Sector")
as examples
Several questions:
- Am I duplicating existing functionality?
- Is cjoin a good name for such a function?
- Would this be useful in base?
-------------- next part --------------
"cjoin" <-
function(fr1, fr2, cnm1, cnm2 = cnm1, which)
{
val = as.data.frame(fr1)
vnms = names(val)
cnm1 = as.character(cnm1)
if (length(cnm1) < 1 || any(is.na(match(cnm1, vnms)))) {
stop("cnm1 must be one or more column names from fr1")
}
fr2nm = names(fr2)
if (!missing(cnm2))...
2006 Mar 13
2
S-Plus Essentials April 24th-27th 2006
S-PLUS ESSENTIALS
24-27th April 2006
Venue : Insightful UK Office, Network House, Basing View, Basingstoke, Hants
RG21 4HG
We are pleased to be taking registrations for the next scheduled S-PLUS
Essentials course being held in Basingstoke 24-27th April 2006. If you are
unfamiliar with S-PLUS or have been meaning to upgrade your S-PLUS skills,
this is the course for you. This course will be
2008 Apr 05
2
How to improve the "OPTIM" results
...16028677, -0.60352008,
-2.86454069,
-0.84411691, 0.24841071, -0.11764954, 5.92662106, 1.03932953,
-6.21987657,
-0.54763352, 0.20263192) # data
theta0= c(log(2),0,c(0,-.3,.3),log(c(10,.05,.05))) # initial value(In fact,
true parameter value)
n = length(x)
fr2 = function(theta)
{
a1 = theta[1]; a2 = theta[2]
mu1 = theta[3]; mu2 = theta[4]; mu3 = theta[5]
g1 = theta[6]; g2 = theta[7]; g3 = theta[8]
w1=exp(a1)/(1+exp(a1)+exp(a2))
w2=exp(a2)/(1+exp(a1)+exp(a2))
w3=1-w1-w2
obj =((w1^2)/(2*sqrt(exp(g1)*pi))
+ (w2^2)/(2*sqrt(exp(g2)*pi))...
2008 Apr 05
2
How to improve the "OPTIM" results
...16028677, -0.60352008,
-2.86454069,
-0.84411691, 0.24841071, -0.11764954, 5.92662106, 1.03932953,
-6.21987657,
-0.54763352, 0.20263192) # data
theta0= c(log(2),0,c(0,-.3,.3),log(c(10,.05,.05))) # initial value(In fact,
true parameter value)
n = length(x)
fr2 = function(theta)
{
a1 = theta[1]; a2 = theta[2]
mu1 = theta[3]; mu2 = theta[4]; mu3 = theta[5]
g1 = theta[6]; g2 = theta[7]; g3 = theta[8]
w1=exp(a1)/(1+exp(a1)+exp(a2))
w2=exp(a2)/(1+exp(a1)+exp(a2))
w3=1-w1-w2
obj =((w1^2)/(2*sqrt(exp(g1)*pi))
+ (w2^2)/(2*sqrt(exp(g2)*pi))...
2012 Apr 29
1
Error in if (nuhat < 2) stop("The degrees of freedom must be greater than or equal to 2") : missing value where TRUE/FALSE needed
...UE/FALSE needed
In addition: Warning messages:
1: In min(sub[vecn >= 12]) :
no non-missing arguments to min; returning Inf
2: In max(sub[vecn >= 12]) :
no non-missing arguments to max; returning -Inf
3: In near(x1, x1[isub[i]], fr1) : NAs introduced by coercion
4: In near(x2, x1[isub[i]], fr2) : NAs introduced by coercion
5: NAs introduced by coercion
> ancboot(covGrp1, dvGrp1, covGrp2, dvGrp2, nboot = 2000)
[1] "Note: confidence intervals are adjusted to control FWE"
[1] "But p-values are not adjusted to control FWE"
[1] "Taking bootstrap samples. Please w...
2011 Dec 20
1
constrOptim and problem with derivative
...(1+exp(-b0+b1))+(1/(1+exp(-b0)))+(1/(1+exp(-b0-b1)))))/3
}
As you can see, my objective function is
((1/(1+exp(-b0+b1))+(1/(1+exp(-b0)))+(1/(1+exp(-b0-b1)))))/3 and I would
like to solve for both b0 and b1.
If I were to use optim then I would derive the gradient of the function
(grr) as follows:
fr2 <-
expression(((1/(1+exp(-b0+b1))+(1/(1+exp(-b0)))+(1/(1+exp(-b0-b1)))))/3)
grr <- deriv(fr2,c("b0","b1"), func=TRUE)
and then simply use optim via
optim(c(-5.2,0.22), fr1, grr)
My problem is that I wish to place constraints (b0>=-0.2 and b1>= 0.1) upon
the values...
2023 Aug 05
1
feature request: optim() iteration of functions that return multiple values
...nly the first element:
returnFirst <- function(fun) function(...) do.call(fun,list(...))[[1]]
Example:
fr <- function(x) { ## Rosenbrock Banana function
x1 <- x[1]
x2 <- x[2]
ans <- 100 * (x2 - x1 * x1)^2 + (1 - x1)^2
list(ans=ans, extra1 = 1:10, extra2 = letters)
}
fr2 <- returnFirst(fr)
tmp <- optim(c(-1.2,1), fr2)
fr(tmp$par)
Am 03.08.23 um 22:21 schrieb Sami Tuomivaara:
> Dear all,
>
> I have used optim a lot in contexts where it would useful to be able to iterate function myfun that, in addition to the primary objective to be minimized ('...
2014 Mar 11
2
Upgrading openssh to 6.5 on centOS 5 machine
....
I am supposed to upgrade openssh on a centOS machine.
Following are the current versions of openssh and centOS.
/tmp# /usr/sbin/sshd -V
OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
/tmp# rpm -q centos-release
centos-release-5-2.el5.centos
I have already tried the following link.
http://fr2.rpmfind.net/linux/rpm2html/search.php?query=openssh
I am unable to find out the right RPM for centOS 5.0.
Can you please point me to the right RPM ?
Thanks
Sachin
2011 Feb 01
1
python-dbus
...#39;t show in the nomal
mirrors.
[root at desk log]# yum info python-dbus
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
* addons: mirrors.finalasp.com
* base: yum.singlehop.com
* centosplus: mirror.web-ster.com
* extras: mirrors.finalasp.com
* rpmforge: fr2.rpmfind.net
* updates: mirror.trouble-free.net
addons | 951 B 00:00
base | 2.1 kB 00:00
centosplus | 1.9 kB 00:00
extras | 2.1 kB 00:00
rpmf...
2008 Mar 09
1
Anyone installed the amazon downloader on 5.1?
Just tried to install the Amazon-downloader on Centos 5.1 (the Fedora 8
version, which seems the closest match of any they offer).
Of course it gets a bazillion unfulfilled dependencies. so I tried
"yum localinstall ./a*m" and it trundles along for a while finding several
of the packages available then spews out this:
Error: Missing Dependency: libboost_date_time.so.3 is needed by
2012 Sep 28
3
Better way of Grouping?
...ta=read(...)
#L v D
L=data[LvD %in% c("L"),]
D=data[LvD %in% c("D"),]
#Groups 3 and 4 within L and D
group3L=L[group %in% c("3"),]
group4L=L[group %in% c("3"),]
group3D=D[group %in% c("3"),]
group4D=D[group %in% c("3"),]
#Times B, S45, FR2, FR8
you get the idea
Is there a more efficient way to subset groups? Thanks for any insight.
Regards,
Charles
[[alternative HTML version deleted]]
2009 Mar 24
2
update yum
Am trying to update my wine i get the following ..
[] download]# yum update wine*
Loading "priorities" plugin
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* epel: ftp.nluug.nl
* rpmforge: fr2.rpmfind.net
* base: ftp.halifax.rwth-aachen.de
* updates: ftp.halifax.rwth-aachen.de
* addons: ftp.halifax.rwth-aachen.de
* extras: ftp.halifax.rwth-aachen.de
0 packages excluded due to repository priority protections
Setting up Update Process
Resolving Dependencies
--> Running transaction c...
2009 Aug 22
2
fasttest mirror -doesnt seem to pick sites near my region
...r . But not even once i have seen it selecting repos which are near my region such as japan or australia ( where i get the best speeds). Something is wrong.
It seems stuck with these 3 sites ;
Determining fastest mirrors
* ftp-stud.fht-esslingen.de : 0.309373 secs
* apt.sw.be : 0.483867 secs
* fr2.rpmfind.net : 0.503842 secs
2011 Dec 21
1
constrOptim and further arguments
...b1)))))/3
> }
>
> As you can see, my objective function is
> ((1/(1+exp(-b0+b1))+(1/(1+exp(-b0)))+(1/(1+exp(-b0-b1)))))/3 and I would
> like to solve for both b0 and b1.
>
> If I were to use optim then I would derive the gradient of the function
> (grr) as follows:
>
> fr2 <-
> expression(((1/(1+exp(-b0+b1))+(1/(1+exp(-b0)))+(1/(1+exp(-b0-b1)))))/3)
> grr <- deriv(fr2,c("b0","b1"), func=TRUE)
>
> and then simply use optim via
>
> optim(c(-5.2,0.22), fr1, grr)
>
> My problem is that I wish to place constraints (b0>=...
2011 Mar 02
2
Error: Missing Dependency: libgnokii.so.4()(64bit) is needed by package 6:kdepim-3.5.10-2.el5.x86_64 (installed)
Hi Y'All,
Yum update on CentOS 5 has for the last week or so started giving me the
following errors
root at neodymium 16:03:46 ~ # nice yum upgrade
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: mirror.sov.uk.goscomb.net
* base: mirror.sov.uk.goscomb.net
* epel: mirror01.th.ifl.net
* extras: mirror.sov.uk.goscomb.net
* rpmfusion-free-updates:
2010 Jun 01
2
how to install ip6tables?
...p6tables doesn't return anything, even with the
rpmforge repository enabled:
root at mercury:[~]$ yum install -y ip6tables
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: mirrors.netdna.com
* base: pubmirrors.reflected.net
* extras: mirror.vcu.edu
* rpmforge: fr2.rpmfind.net
* updates: ftp.lug.udel.edu
Excluding Packages in global exclude list
Finished
Setting up Install Process
No package ip6tables available.
Nothing to do
Doing a google search for "how to install ip6tables", ironically, returns
results on how to disable it. I have disabled it...
2011 Jul 26
1
Yum Issues ; Segmentation fault
...sue this morning:
[root at server ~]# yum clean all
Loaded plugins: fastestmirror
Cleaning up Everything
Cleaning up list of fastest mirrors
[root at server ~]# yum update
Loaded plugins: fastestmirror
Determining fastest mirrors
* base: mirror.unl.edu
* extras: mirror.steadfast.net
* rpmforge: fr2.rpmfind.net
* updates: mirror.unl.edu
base
| 2.1
kB 00:00
base/primary_db
| 2.2
MB 00:00
extras
| 2.1...
2005 Feb 09
1
Compile on RHAS/RHEL3?
List,
both on RHAS3 update3, update 4, Samba source code 3.0.9 thru 11 gives
SIGSEGVs on make check. Installing the buggers and trying to run them
gives the same.
*THOUGH*.
The Red Hat beta 3.0.9 srpm at fr2.rpmfind.net comples and runs "like a
little sun" ("net als een zonnetje", in Dutch).
Anyone compiled Samba 3.0.11 on Red Hat RHAS3/RHEL3? Not "how", just
"yes", please ;) I'll get onto you by private mail if "yes", otherwise I
won't bother...
2016 Apr 22
0
R2BayesX help
...x7.tot<-runif(nsample,0,1)
pnoise<-0.2
eta<-f2(x1.tot,x2.tot,x3.tot,x4.tot)
y.tot<-eta+pnoise*rnorm(nsample,0,1)
d<-data.frame(y.tot,x1.tot,x2.tot,x3.tot,x4.tot,x5.tot,x6.tot,x7.tot)
nk2<-5
# the full model that contains the interactions of all pairs of x1~x7, 21
terms in total
fr2<-y.tot ~ sx(x1.tot, x2.tot, knots = nk2, bs = "te") + sx(x1.tot,
x3.tot, knots = nk2, bs = "te") +
sx(x1.tot, x4.tot, knots = nk2, bs = "te") + sx(x1.tot, x5.tot, knots =
nk2, bs = "te") +
sx(x1.tot, x6.tot, knots = nk2, bs = "te") + sx(x1.to...