Displaying 20 results from an estimated 1000 matches similar to: "Matrix Construction; Subdiagonal"
2010 Sep 29
2
Script auto-detecting its own path
Hi all,
Forgive me if this question has been addressed, but I was unable to find anything in the r-help list or in cyberspace. My question is this: is there a function, or set of functions, that will enable a script to detect its own path? I have tried file.path() but that was not what I was looking for. It would be nice to be able to put all the related scripts I use in the same folder with a
2009 Feb 19
4
Matrix package: band matrix
I want to construct a symmetric band matrix in the Matrix package from a matrix where the first column contains data for the main diagonal, the second column has data for the first subdiagonal/superdiagonal and so on.
Since the Matrix will be 10^5 x 10^5 or so, with perhaps 10-20 non-zero elements above the diagonal per row, I can't do it by constructing a full matrix and then using the
2005 Jul 12
3
elegant matrix creation
Hi
I want to write a little function that takes a vector of arbitrary
length "n" and returns a matrix of size n+1 by n+1.
I can't easily describe it, but the following function that works for
n=3 should convey what I'm trying to do:
f <- function(x){
matrix(c(
1 , 0 , 0 , 0,
x[1] , 1 , 0 , 0,
x[1]*x[2] , x[2] , 1 , 0,
2012 Apr 12
3
writing spdiags function for R
Dear R-list,
I am in the process of translating a long function written in Matlab
into R (mainly because I am a big of fan of R, and folks will not
have to pay to use it :). In the translation of this function
I got stack because they use spdiags, which, as far as I can tell
it is not available in R. I have explored the Matrix package, from
which I borrowed some of the functions (e.g.,
2011 Feb 25
1
Accessing sub diagonals / spdiag in R ?
Hello, I'm attempting to access a specific number of sub diagonals in a
MATRIX and have been accustomed to using spdiags in MATLAB or Octave. I've
got a solution pieced together using for loops and it works though isn't
vectorized and liable to run very slow
for large matrices.
As an example:
A =
1 2 3 4 5
9 8 7 6 5
4 5 6 7 8
5 4 3 2 1
8 7 6 0 1
The subdiagonals are: 9,5,3,0 4,4,6
2008 Nov 20
2
[Obo-relations] Discussion summary on "original" biological parts
mejino at u.washington.edu wrote:
>
>
>>> A canonical human body will have canonical parts and those canonical
>>> parts will
>>> have canonical subparts and so on.
>>
>> ... and?
>>
>>> Can't think of anyone who would fit that
>>> description.
>>
>> is this considered an argument for that there cannot possibly an
2007 Dec 19
1
Function reference
Hi.
I'm looking for an R equivalent to something like function pointers in C/C++. I have a search procedure that evaluates the fitness of each point it reaches as it moves along, and decides where to move next based on its fitness evaluation. I want to be able to pass different fitness functions to this procedure. I am trying to find a good way to do this. I was thinking of passing in
2005 Jul 01
4
Lines for plot (Sweave)
Dear List:
I am generating a series of plots iteratively using Sweave. In short, a
dataframe is subsetted row by row and variable graphics are created
conditional on the data in each row. In this particular case, this code
ends up generating 17,000 individual plots.
In some cases, all student data (this is working with student
achievement data) are available and my code below works very well in
2013 Jun 19
3
[LLVMdev] Building a stable bitcode format for PNaCl - based on LLVM IR
> From the provided documentation I understood that in memory data
> structures of a PNaCl program are incompatible to the host program because
> ABIs are different (e.g. PNaCl pointers are always 32-bit even when running
> on x86_64 platform).
> So PNaCl program can't access any data structures of the host program
> directly. The only communication way is by using syscalls,
2010 Mar 10
1
Strange result in survey package: svyvar
Hi R users,
I'm using the survey package to calculate summary statistics for a large
health survey (the Demographic and Health Survey for Honduras, 2006), and
when I try to calculate the variances for several variables, I get negative
numbers. I thought it may be my data, so I ran the example on the help
page:
data(api)
## one-stage cluster sample
dclus1<-svydesign(id=~dnum, weights=~pw,
2013 Jun 19
0
[LLVMdev] Building a stable bitcode format for PNaCl - based on LLVM IR
Am 19.06.2013 18:01, schrieb JF Bastien:
>
> From the provided documentation I understood that in memory data
> structures of a PNaCl program are incompatible to the host program
> because ABIs are different (e.g. PNaCl pointers are always 32-bit
> even when running on x86_64 platform).
> So PNaCl program can't access any data structures of the host
>
2013 Jan 23
1
Evaluating the significance of the random effects in GLMM
Hi all!
I am working with GLMM using the binomial family
I use the following codes
I dropped no significant terms, refitting the model and comparing the
changes with likelihood:
G.1<-lmer(data$Ymat~stu+spi+stu*sp1+(1|ber),data=data,family="binomial")
G.1b<-lmer(data$Ymat~stu+spi+(1|ber),data=data,family="binomial")
anova (G.1,G.2)
But, when I want to evaluate the
2006 Jun 26
4
why can''t I call this without parentheses?
I have a little helper that lets me add legacy fields to models where
they have common prefixes, suffixes, or something else weird. Here is
the method signature:
def legacy_fields(options = {}, *attributes)
.....
end
options is a hash containing things like :prefix => "post_" - and
attributes is a list of attribute names. This gets mixed into the
class with extend, so I call
2009 Jun 16
3
The most straightfoward way to write a function that sums over the rows of a matrix
Hello!
I am trying to write a function with vector and data.frame parameters that
uses the sum() function and values from the rows of the data.frame.
I need to pass this function as a parameter to optim().
My starting point is:
observs <- data.frame(y, x1, x2, x3)
Fn <- function(par, observs) {
sum( (y - (par[1] * (x1 + 1) * x2^(-par[2]) * x3^par[3])^2 )
}
2011 Jun 15
12
Create or Update Model with JSON?
Having issue updating a model with JSON. I simply *"model.attributes=json"*,
which does update the attributes but not the id, or uuid in this case. I
want to save or create the record (if it''s id exists). Seems like this would
be documented, but I''m not finding anything. I''m using a MOM to pass JSON
between apps. Thanks.
--
You received this message because
2015 Aug 27
2
please block user
On 08/27/15 09:31, m.roth at 5-cent.us wrote:
<>
> *sigh*
> And they're probably sent by a script running on the PC of a fat,
> 47 yr old guy living in a basement and making money this way....
>
.
i seriously doubt it.
several of the responses could not have been from a fat 47 yo guy.
--
peace out.
If Bill Gates got a dime for every time Windows crashes...
...oh, wait.
2009 Jun 16
2
Trouble with optim on a specific problem
Hello!
I am getting the following errors when running optim() [I tried optim() with
3 different methods as you can see]:
Error in optim(c(0.66, 0.999, 0.064), pe, NULL, method = "L-BFGS-B") :
objective function in optim evaluates to length 6 not 1
> out <- optim( c(0.66, 0.999, 0.064), pe, NULL, method = "Nelder-Mead")
Error in optim(c(0.66, 0.999, 0.064),
2008 Oct 03
2
suggestions for plotting 5000 data points
Dear all,
I have a collection of 5000 entries which represent the evolutionary
rates of 3 animals.
I would like to show the differences between the rates of all 3
animals and have tried using the function parallel (from the lattice
package) and pairs() function.
The parallel function would have been perfect save for the large
number of data (5000). The pairs() function doesn't show
2005 May 30
4
Very simple traffic shaping script for H.323
Hello -
What I want to do seems very simple - I want to make sure any H.323
traffic gets processed before anything else entering or leaving this
network. The network has a videoconferencing device on the LAN at
192.168.16.4. A Linux firewall NATs an external IP Address to this
internal address and I have appropriate SNAT and DNAT rules that work.
The NAT and connection tracking rules all work
2018 Aug 27
2
sshd 7.8p1 close connection from VMware Fusion NAT Port Forwarding
On 2018-08-27, Stuart Henderson <stu at spacehopper.org> wrote:
> On 2018-08-27, Zach Cheung <kuroro.zhang at gmail.com> wrote:
>> After upgrading my VMware Fusion (10.1.3) Arch Guest to the latest with
>> OpenSSH upgraded from 7.7p1 to 7.8p1, found that ssh from macOS Sierra
>> (10.12.6) host to Arch guest via local NAT port forwarding failed, but via
>>