Displaying 20 results from an estimated 32 matches for "solns".
Did you mean:
solis
2005 Nov 05
3
solve the quadratic equation ax^2+bx+c=0
If I have matrics as follows:
> a <- c(1,1,0,0)
> b <- c(4,4,0,0)
> c <- c(3,5,5,6)
How can I use R code to solve the equation ax^2+bx+c=0.
thanks!
yuying shi
[[alternative HTML version deleted]]
2011 Nov 11
0
mc.cores and computer settings on osx and linux
for the googleable r-help archives, I thought I would post what I
wrote into my .Rprofile to automatically set some system information.
the most relevant aspect is the determination of mc.cores. this is
useful when users want to use the parallel package
options(uname= system("uname", intern=TRUE))
options(os= if (getOption("uname")=="Darwin") "osx"
2012 Mar 26
1
assigning vector or matrix sparsely (for use with mclapply)
Dear R wizards---
I have a wrapper on mclapply() that makes it a little easier for me to
do multiprocessing. (Posting this may make life easier for other
googlers.) I pass a data frame, a vector that tells me what rows
should be recomputed, and the function; and I get back a vector or
matrix of answers.
d <- data.frame( id=1:6, val=11:16 )
loc <- c(TRUE,TRUE,FALSE,TRUE,FALSE,TRUE)
2007 Oct 16
1
underdetermined system
Hi, sorry, I'm an idiot.. and I know I'm missing something stupid..
I thought if we solve an underdetermine system with QR, my soln is:
min ||x|| (L2 sense) such that Ax = b
then say i have:
> w <- matrix(c(1, 5), ncol=2)
> sw = 2
> qrW = qr(t(w) %*% w)
> qr.coef(qrW, t(w) %*% sw)
[,1]
[1,] 2
[2,] NA
but we also have soln (0, 2/5) which obviously has a
2011 Oct 22
0
simplified multicore by() function
dear R readers---I thought I would post the following snippet of R
code that makes by() like operations easier and faster on multicore
machines for R novices and amateurs. I hope it helps some. YMMV.
feel free to ignore.
PS: I wish R had a POD-like documentation system for end users that
are not writing full libraries. because it does not, I did not
provide documentation ala '?mc.by'.
2008 Dec 16
1
refer to next line within a data-frame an select cases
Hi,
I have a problem sorting and selecting entries within a data-frame and
I don't know if it is possible to solve it with R ... (probably yes,
but I have no idea how).
Following Data;
row1 row2
a 12
pos NA
a 3
neg NA
a 5
neg NA
a 11
pos NA
I want to extract the values in row 2 in the lines with an "a" in row1.
But I want to have two vectors: vector x with all
2010 Apr 20
2
QCA3 segfault
...unt =
as.integer(x.count), objective = as.double(objective), const.count =
as.integer(const.count), constraints = as.double(constraints), int.count
= as.integer(int.count), int.vec = as.integer(int.vec), bin.count =
as.integer(bin.count), binary.vec = as.integer(binary.vec),
num.bin.solns = as.integer(num.bin.solns), objval = as.double(objval),
solution = as.double(solution), presolve = as.integer(presolve),
compute.sens = as.integer(compute.sens), sens.coef.from =
as.double(sens.coef.from), sens.coef.to = as.double(sens.coef.to), duals
= as.double(duals), duals.from...
2012 Jan 30
2
ode() tries to allocate an absurd amount of memory
Hi there R-helpers:
I'm having problems with the function ode() found in the package deSolve.
It seems that when my state variables are too numerous (>33000 elements),
the function throws the following error:
Error in vode(y, times, func, parms, ...) :
cannot allocate memory block of size 137438953456.0 Gb
In addition: Warning message:
In vode(y, times, func, parms, ...) : NAs
2006 Jan 11
1
can remote_function update two div simultaneously?
hi all
i m using remote_function , & i need to update two divs at same time (so no :success/:failure)....
is there any posiible soln for this
thanks
rohit
---------------------------------
Yahoo! Photos
Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2005 Mar 11
1
Simplex(boot) returning invalid answer
In trying to use simplex() from the boot package, I have run into a
situation that doesn't seem like it should be possible. It is claiming
that it has solved the LP, but returns a vector of all zeros, which
does not satisfy the constraints I passed in. A small example:
> ubMatrix <- matrix(c(1,1,-1,0,-1,-1), 3, 2)
> ubVector <- c(2,1,-1)
> objective <- c(0,1)
>
2006 Oct 03
0
rsync stops outputting when synchronizing a directory with many files
Hello,
I use rsync to mirror the home directories of users on a computational
cluster for backup purposes. There are users who have single
directories containing 12,000+ files. I am using RHEL 4.0 update 4,
and the rsync is version:
rsync version 2.6.3 protocol version 28
When rsync is deleting the files in a directory with 12,000+ files
(i.e. when the directory was removed in the
2018 Feb 10
0
Optim function returning always initial value for parameter to be optimized
On 02/10/2018 06:00 AM, r-help-request at r-project.org wrote:
> Did you check the gradient? I don't think so. It's zero, so of course
> you end up where you start.
>
> Try
>
> data.input= data.frame(state1 = (1:500), state2 = (201:700) )
> err.th.scalar <- function(threshold, data){
>
> state1 <- data$state1
> state2 <- data$state2
>
2018 Feb 09
1
Optim function returning always initial value for parameter to be optimized
Hello,
I'm trying to fminimize the following problem:
You have a data frame with 2 columns.
data.input= data.frame(state1 = (1:500), state2 = (201:700) )
with data that partially overlap in terms of values.
I want to minimize the assessment error of each state by using this function:
err.th.scalar <- function(threshold, data){
state1 <- data$state1
state2 <- data$state2
2016 Apr 07
5
Suddenly increased my hard disk
Hi John,
Am currently running dos mode not graphical mode.
Could you have any other method.
Hi Ashish,
You are correct.
qmailtoaster backup file which was around 184 GB in backup.gz type and i
have removed .bz2 type file with the same backup/mailbkup directory.
After removed .bz2 file it's gone backup.gz also which was 184 GB file.
I have run this command locate .gz but couldn't find out
2010 Mar 11
4
help about solving two equations
I have two matrix s1 and s2, each of them is 1000*1.
and I have two equations:
digamma(p)-digamma(p+q)=s1,
digamma(q)-digamma(p+q)=s2,
and I want to sovle these two equations to get the value of x and y, which are also two 1000*1 matrices.
I write a program like this:
f <- function(x) {
p<- x[1]; q <- x[2];
((digamma(p)-digamma(p+q)-s1[2,]) )^2 +((digamma(q)-digamma(p+q)-s2[2,]) )^2
2012 Nov 15
2
Optimizing
Hello,
I am fairly new with R and am having trouble finding an optimal group. I
checked the help functions for the various optimize commands and it was a
little over my head.
I have a dataset with 4 columns, name, type, value, and cost. The set
consists of a list of people, which have 3 types. I want to choose 6
people, two of each type, and maximize the sum of their values. However,
I'm
2010 Jul 27
2
lattice: option to sort x when type = l
Hi,
(please Cc me)
In xyplot (), type = "l" (or one that includes "l", *el*) is
(generally) meaningful only when the 'x' variable is sorted. In
practice, one either sorts the data frame before hand or writes a tiny
panel function which sorts the supplied x and then calls the default
panel.xyplot(). Trouble arises when there is a conditional variable as
well as a
2016 Apr 07
0
Suddenly increased my hard disk
Hi Chandran,
On Thu, Apr 7, 2016 at 10:38 AM, Chandran Manikandan <tech2mani at gmail.com>
wrote:
> Hi John,
> Am currently running dos mode not graphical mode.
> Could you have any other method.
>
> Hi Ashish,
> You are correct.
> qmailtoaster backup file which was around 184 GB in backup.gz type and i
> have removed .bz2 type file with the same backup/mailbkup
2004 May 27
0
How to use R Library in VC++ wrapper dll (SOS)
Hi Helpers.
I am creating one wrapper VC++ dll for use some simple statistical functions like correlation/covariance for my college project.
I have done the following:
I have gone thru R-exts.pdf u r mentioning. I have follwed the steps gievn under topic "The R api: entry points for C code".
I have done these things
1) Created vc++ simple dll project.
2)inclued <R.h> in the
2009 Apr 07
0
Repeated SANN values.
I tried optim using the SANN algoithm. To start things out I tried the example of solving the "traveling salesman" problem as given in the documentation. The example works just fine. But if I comment out the line:
set.seed(123) # chosen to get a good soln relatively quickly
More often than not it doesn't converge to the optimum solution as shown in the example. Alos with trace on