Displaying 20 results from an estimated 37 matches for "gridsiz".
Did you mean:
gridsize
2007 Feb 12
0
[865] trunk/wxruby2/doc/textile/gridsizer.txtl: Added missing methods section
...d #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[865] trunk/wxruby2/doc/textile/gridsizer.txtl: Added missing methods section</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>865</dd>
<dt>Author</dt> <dd>brokentoy</dd>
<dt>Date</dt> <dd>2007-02-12 14:21:32 -0500 (...
2017 Jan 24
3
Convertir programa Matlab a R sacado de Threshold Models of Collective Behavior de Michèle Lai & Yann Poltera
...a en Matlab a R.
El original lo saqu de:
Lai, M., & Poltera, Y. (2009). Lecture with computer exercises: Modelling and simulating social systems with matlab. Tech. rep., Swiss Federal Institute of Technology (December 2009). 27.
Ahora estoy convirtiendo la siguiente funcin:
function sizes = gridsizes(N,varargin)
% gridsizes(N) calculates the best factorization of N into two integers N1 and
% N2 such that : N1xN2 == N and N2-N1 -> min (optimal grid)
% gridsizes(N,C1,C2) calculates the best factorization of N into two integers N1 and
% N2 such that : N1xN2 == N and N2-N1 -> min, under the...
2003 May 28
1
Kernel density
Hi,
I want to fit a kernel density estimator by bkde of library KernSmooth.
I need only the density value at the point 0.
I do not understand the following behaviour:
> q <- rnorm(100)
> bkq <- bkde(q, bandwidth=0.11, gridsize=1, range.x=c(0,0))
Error in 0:L : NA/NaN argument
> bkq <- bkde(q, bandwidth=0.11, gridsize=1, range.x=c(-1,1))
> bkq
$x
[1] -1
$y
[1] NA
> bkq <- bkde(q, bandwidth=0.11, gridsize=3, range.x=c(-1,1))
Warning message:
longer object length
is not a multiple of shorter object lengt...
2005 Aug 10
2
extend question
Is it possible to call the super class''s version of a function from a subclass?
SuperClass = Class.create();
SuperClass.prototype = {
initialize: function(){
this.varA = '''';
this.varB = '''';
}
}
SubClass = Class.create();
SubClass.prototype = (new SuperClass()).extend({
initialize: function(somevar) {
this.somevar = somevar;
}
2011 Aug 09
1
How to pass different arguments to a function within lapply()?
...don't have "KernSmooth" package installed, please uncomment
below line.
# install.packages("KernSmooth")
library(KernSmooth)
rst <- data.frame(hsp = rnorm(23), dal = rnorm(23)
gs <- 350
ts <- seq(1, 353, 16)
bw <- lapply(rst, dpill, x = ts, gridsize = gs)
# If I just want to apply locpoly function seperately
lp.hsp <- locpoly(x = ts, y = rst$hsp, bandwidth = bw$hsp, gridsize = gs)
lp.dal <- locpoly(x = ts, y = rst$dal, bandwidth = bw$dal, gridsize = gs)
-----------------------------------------------------------------------------------...
2012 Jul 16
2
about dpik
...to be
feasible.
x<-c(-0.00109349389485645,-0.00145304131152137,0.00023685387037116,0.00579094886320110,0.00032117330426379,0.00363758302533228,-0.00113344327121731,0.00104726223729409)
library(KernSmooth)
h<-dpik(x,scalest="minim",level=2L,kernel="normal",canonical=FALSE,gridsize=401L,range.x=range(x),truncate=TRUE)
h
But the point is how to import more than 1000 numbers into the c() to
vectorize them?
Thanks
Regards
--
View this message in context: http://r.789695.n4.nabble.com/about-dpik-tp4636695.html
Sent from the R help mailing list archive at Nabble.com.
2009 Jan 29
4
Help understanding EVERYTHING
Team,
I am trying to learn a GUI for Ruby and I picked wxRuby.
The problem is that I am kind of slow learning this and I now feel
frustrated after trying for about at least 7 hours.
I am trying to design a simple Sudoku 9x9 grid to display numbers, 1 - 9,
using buttons.
I posted a question on Ruby forum ruby-talk and a gentleman, Alex Fenton,
answered my questions.
Alex gave me what appear to be
2006 Dec 18
2
surface3d grid from xyz dataframe
...ue,height,gridcol as variables of the dataframe. The grid
dimensions are 1253 x 2001 (=2507253 data points).
My attempts with surface3d fail, mainly because I cannot produce the
matrix required for the height input.
elev.to.list{CTFS} fails with: "Error in matrix(elevfile$elev, nrow=
1+ydim/gridsize, ncol=1+xdim/gridsize. : attempt to set an attribute on
NULL" which I assume means it requires a square grid (=quadrates).
Any ideas/help appreciated
Thanks
Herry
Dr Alexander Herr
Spatial and statistical analyst
CSIRO, Sustainable Ecosystems
Davies Laboratory,
University Drive, Douglas, Q...
2004 Nov 22
1
Layout Issue ...
...amilar with wxRuby and any advice is appreciated.
# CODE STARTS HERE ....
require ''wxruby''
class TestApp < Wx::App
def on_init
@frame = Wx::Frame.new( nil, -1, "Test", Wx::DEFAULT_POSITION )
@panel = Wx::Panel.new( @frame )
@topSizer = Wx::FlexGridSizer.new( 1, 3 )
@topSizer.add( createInputSizer(), 1, Wx::GROW|Wx::ALL, 2 )
@topSizer.add( createGridSizer(), 1, Wx::GROW|Wx::ALL, 2 )
@topSizer.add( createButtonSizer(), 1,
Wx::ALIGN_CENTER_HORIZONTAL|Wx::ALL, 2 )
@panel.set_sizer( @topSizer )
@topSizer.fit( @frame )
@...
2012 Jun 14
2
density plot on a log scale
...xlim=c(100,100000000),
ylim=c(100,10000000000),
log="xy",
pch="."
)
the output seems to only show a few of the points, and they are in odd
places that don't seem to correlate at all with the colors. I got a warning
that I should increase the gridsize, but even using comically large values
(nbin=10000) didn't help. Does anybody know how I can do this? Thanks!
--
View this message in context: http://r.789695.n4.nabble.com/density-plot-on-a-log-scale-tp4633347.html
Sent from the R help mailing list archive at Nabble.com.
2007 May 28
0
[1033] trunk/wxruby2/swig: GC fixes for nested sizers; fix crashes in html.rb demo
...GC fixes for nested sizers; fix crashes in html.rb demo</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwxruby2swigclassesBoxSizeri">trunk/wxruby2/swig/classes/BoxSizer.i</a></li>
<li><a href="#trunkwxruby2swigclassesFlexGridSizeri">trunk/wxruby2/swig/classes/FlexGridSizer.i</a></li>
<li><a href="#trunkwxruby2swigclassesGridBagSizeri">trunk/wxruby2/swig/classes/GridBagSizer.i</a></li>
<li><a href="#trunkwxruby2swigclassesGridSizeri">trunk/wxruby2/s...
1999 Nov 18
0
bkde() breaks
Hello,
I've been using the KernSmooth package recently and think I have found a
problem with it:
after loading the library I can issue
bkde(c(27,26,27), bandwidth=dpik(c(27,26,27)), range.x=c(4.4, 113.6),
gridsize=128, truncate=T)
and bkde returns an error. If I change the gridsize to 129 the function
works perfectly. I have tried this on my Linux box, and on a nearby
Solaris machine, both give an error (but not quite the same one).
In case anyone is wondering how I came across these values they are
just...
2004 Mar 05
0
(no subject)
...he locpoly function
from the kernsmooth package in order to estimate a regression
function.at each estimation i want to leave one observation out,and i
want my estimation to be at the observation i left out.i tried :
for (j in 1:length(x1))
+ A<-locpoly(x1[-1],y1[-1],bandwidth=4,gridsize=1,range.x=x1[1])
Error in rep.default(0, dimfkap) : invalid number of copies in "rep"
i want the gridsize to be equal to one,and i will choose the bandwidth
at each time.what am i doing wrong?can you help me?
2004 Mar 05
0
locpoly (was: no subject)
...kernsmooth package in order to estimate a regression
> function.at each estimation i want to leave one
> observation out,and i
> want my estimation to be at the observation i left out.i tried :
>
> for (j in 1:length(x1))
> + A<-locpoly(x1[-1],y1[-1],bandwidth=4,gridsize=1,range.x=x1[1])
> Error in rep.default(0, dimfkap) : invalid number of
> copies in "rep"
>
> i want the gridsize to be equal to one,and i will choose
> the bandwidth
> at each time.what am i doing wrong?can you help me?
> ________________________________...
2008 May 11
0
loess and locpoly
...chose a bandwith so I take locpoly method to fit a curve.
My problem is:I know how to get predicted values in loess:
m=loess(y~x)
y_fitted=predict(m).
But how to get the same in locpoly? I computed like this:
bw=dpill(x, y, blockmax = 5, divisor = 20,trim = 0.01, proptrun = 0.05,
gridsize = n, range(x), truncate = FALSE)
m=locpoly(x, y, drv = 0, degree = 1, gridsize= n, bandwidth=bw, bwdisc = 25,
range(x), binned = FALSE)
fitfn <- approxfun(m$x, m$y)
m_y <- fitfn(x)
but i'm not sure it is right?
Thanks in advanced.
Paw...
2012 Jul 15
1
About dpik function
...the return rate from Yahoo Finance.
Secondly, my code is following:
> r=read.table("/Users/user/Desktop/research/a.txt",sep=",",header=TRUE)
> x<-r[8:1010,]
> library(KernSmooth)
> dpik(x,scalest="minim",level=2L,kernel="normal",canonical=FALSE,gridsize=401L,range.x=range(x),truncate=TRUE)
But the error happens like this:
Error in Summary.factor(c(233L, 917L, 381L, 748L, 272L, 242L, 269L, 963L, :
range not meaningful for factors
I don't know what's wrong and i am a rookie, please help with that. Thanks!
--
View this message in con...
2005 Nov 11
0
A couple of draggable patches...
...t/2826> with a
patch for enabling 'snapToGrid' feature for draggables.
I'm writing a framework on top of scriptaculous and it appeared to me that
this would be something that could belong to core Draggable objects.
To activate, just add to draggable options on creation. (By default gridSize
is set to 10)
> new Draggable('revertbox1',{handle:'handle1',snapToGrid:true, gridSize:30,revert:true});
>
>
I also stuck this <http://dev.rubyonrails.com/ticket/2827> in which has been
very handy for me and allows draggable observers to react to the draggable
drag...
2007 Dec 10
0
problem using "by" with custom function?
...W079 12 W079_12 1497918 12131631
9 11756 W079 12 W079_12 1498019 12131638
10 11757 W079 12 W079_12 1498017 12131633
Function for calculating bandwidth:
> kern.est
function(data) {
x.var <- (data$x / sd(data$x)); y.var <- (data$y / sd(data$y))
dpik.x <- dpik(x.var, gridsize = round((max(data$x) - min(data$x))/100))
dpik.y <- dpik(y.var, gridsize = round((max(data$y) - min(data$y))/100))
bw.avg <- ((dpik.x + dpik.y)/2)
by command used:
junk3 <- by(w079.all[,5:6], w079.all$animonth, kern.est)
output from small files (only a few levels of animonth):
w079.all...
2007 Jul 04
0
[1108] trunk/wxruby2/swig: Revised mem mgmt for Sizers to address more GC crashes in Sizers demo
...mt for Sizers to address more GC crashes in Sizers demo</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwxruby2swigclassesBoxSizeri">trunk/wxruby2/swig/classes/BoxSizer.i</a></li>
<li><a href="#trunkwxruby2swigclassesFlexGridSizeri">trunk/wxruby2/swig/classes/FlexGridSizer.i</a></li>
<li><a href="#trunkwxruby2swigclassesGridBagSizeri">trunk/wxruby2/swig/classes/GridBagSizer.i</a></li>
<li><a href="#trunkwxruby2swigclassesGridSizeri">trunk/wxruby2/s...
2006 Mar 31
1
mutual information for two time series
...-numeric(lmax)
jointplogp<-matrix(0,nrow=100,ncol=100)
lh<-as.vector(datin[,1])
rh<-as.vector(datin[,2])
rhemb<-embed(rh,lmax)
lhc<-lh[1:length(rhemb[,1])]
for (i in 1:lmax) {
rhc<-rhemb[,i]
kd<-bkde2D(cbind(lhc,rhc),bandwidth=c(dpik(lhc),dpik(rhc)),gridsize=c(100,10
0),truncate=T)
#2d kernel density estimate in 2 dimensions)
kdmat<-as.matrix(kd$fhat)
for (j in 1:100){
p<-sum(kdmat[j,])
lhplogp[j]<-p*log(p)
}
lhplogp[is.nan(lhplogp)]<-0...