Displaying 20 results from an estimated 10000 matches similar to: "Summing over intervals"
2009 May 31
7
[mapstraction commit] r11 - Added functionality to automatically load scripts needed.
Author: robert.moran
Date: Sun May 31 11:13:23 2009
New Revision: 11
Modified:
trunk/source/mxn.core.js
trunk/source/mxn.js
trunk/source/mxn.yahoo.core.js
trunk/tests/index.htm
Log:
Added functionality to automatically load scripts needed.
Allowed mapstraction default constructor to have provider omitted (will use
first loaded provider).
Minor change to yahoo implementation -
2005 Jan 28
2
Direct sum of matrices
Hi R users:
How can I built a direct sum function of matrices in R?
I mean A(mxn), B(pxq), C(rxs),...
X<-ds(A,B,C,...)
X = [ A, 0, 0
0, B, 0
0, 0, C] ((m+p+r+...) x (n+q+s+...))
Thank you for your help.
Kenneth
--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
2010 Apr 25
3
Noobie question on aggregate tapply and by
I have a 43MB dataframe ( 5 variables) and I'm trying to summarize subsets
of the data.
I've RTFM ( not very clear) and looked at a variety of samples but cant seem
to figure out
how to make these functions work.
A sample of what I want to do would be this:
ids<-seq(1,50)
years<-c(rep(5,10),rep(6,10),rep(7,10),rep(8,20))
2010 Apr 30
6
addListener
I am trying to use the marker method addlistener(). A simplified version
of what I''m trying to do:
var map;
var marker;
map = new mxn.Mapstraction(''myMap'',''google'');
map.setCenterAndZoom(new mxn.LatLonPoint(45.559242,-122.636467),
15);
marker = new mxn.Marker(new mxn.LatLonPoint(45.559242,
2011 Jan 04
5
Webkit - can't find variable: mxn
In my app (v2.0.15) and on the mapstraction demo the first time I load the page in Safari I get the error "Can''t find variable: mxn" and the map doesn''t load.
http://mapstraction.appspot.com/
mapstraction.googlecode.com/svn/trunk/source/mxn.core.js:6ReferenceError: Can''t find variable: mxn
I''ve seen a few old posts in the list archives about similar
2011 Sep 12
5
Hourly data with zoo
I have date data as a numeric and hourly data in 0 to 2300 hours in a dataframe.
d <- rep(20110101,24)
h <- seq(from = 0, to = 2300, by = 100)
df <- data.frame(LST_DATE = d, LST_TIME = h, data = rnorm(24, 0, 1))
S <- chron(dates. = as.character(df$LST_DATE), times. =
paste(as.character(df$LST_TIME/100), ":0:0", sep = ""),
format =
2010 Jun 05
5
Matrix to Vector
Given a matrix of m*n, I want to reorder it as a vector, using a row major
transpose.
so:
> m<-matrix(seq(1,48),nrow=6,byrow=T)
> m
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,] 1 2 3 4 5 6 7 8
[2,] 9 10 11 12 13 14 15 16
[3,] 17 18 19 20 21 22 23 24
[4,] 25 26 27 28 29 30 31 32
[5,] 33 34 35 36 37
2010 Aug 11
2
Sweeping a zoo series
Given a long zoo matrix, the goal is to "sweep" out a statistic from the
entire length of the
sequences.
longzoomatrix<-zoo(matrix(rnorm(720),ncol=6),as.yearmon(outer(1900,seq(0,length=120)/12,"+")))
cnames<-c(12345,23456,34567,45678,56789,67890)
colnames(longzoomatrix)<-cnames
longzoomatrix[1:24,]
12345 23456 34567 45678
2009 Nov 19
5
speaking about mxn at #geomob
Fellow mapstractors,
I''m speaking about mapstraction tonight at a London neogeo event - #geomob
http://gmdlondon.ning.com/events/geomob-november
basically I''ll jus be explaining what mxn is, how ift can be used, and a
brief history of the project and trying to encourage more people to
contribute.
My slides are here:
http://www.slideshare.net/lokku/mapstraction-2537688
let me
2012 Apr 02
2
Error in gamma(delta + (complex(0, 0, 1) * (x - mu))/alpha) : unimplemented complex function
I am trying to obtain the grafic of a pdf . but this error keeps showing .
Here is the code
MXN.fd = function(x,alpha,beta,mu,delta)
{
A = (2*cos(beta/2))^(2*delta)
B = 2*alpha*pi*gamma(2*delta)
C = (beta*(x-mu))/alpha
D = abs(gamma(delta + (complex(0,0,1)*(x-mu))/alpha)^2)
M = A/B*exp(C)*D
M
plot(x,M,type="l",lwd=2,col="red")
}
alpha = 0.02612297
beta = -0.50801886
mu =
2011 Jul 27
2
Elegant way to subtract matrix from array
there are really two related problems here
I have a 2D matrix
A <- matrix(1:100,nrow=20,ncol =5)
S <- matrix(1:10,nrow=2,ncol =5)
#I want to subtract S from A. so that S would be subtracted from the
first 2 rows of
#A, then the next two rows and so on.
#I have a the same problem with a 3D array
# where I want to subtract Q for every layer (1-10) in Z
# I thought I solved this one
2010 Aug 30
4
Implementation of openBubble for openlayers
Hello,
I''m back with another problem, the method Marker.openBubble isn''t
implemented yet. I tried to hack a solution but I encountered some problems.
When the popup is created in the toProprietary method from Marker in
mxn.openlayers.core.js, I keep a reference on it with a this.infoPopup =
popup.
Later in the openBubble method, I do :
2009 Oct 22
6
Mapstraction V2 Geocoder?
Hey all,
I''m wondering about your thoughts on upgrading the Geocoder to use
Mapstraction V2. Currently it uses the old syntax (i.e., for
LatLonPoint, etc.):
http://mapstraction.appspot.com/#geocoding
Moving from V1 to V2 is fairly simple changes to the code. However, I
wonder whether we want to update the way the geocoder is structured,
as well? Some options:
1) Roll geocoding
2003 Mar 12
7
R help
Dear friends,
I work with Matlab and now a bit in trouble with getting used to R. Could you give me some help with the following questions:
1. how to generate the random matrix mxn with constant mean and variance, say N(0,1)?
2. how to create a code (function), say “myfunction”, and make it available for use every time I run R?
3. how to make a package, say “e1071”, available for use
2010 Jul 30
2
Summing by index
# build a sample data frame illustrating the problem
ids<-c(rep(1234,5),rep(5436,3),rep(7864,4))
years<-c(seq(1990,1994,by=1),seq(1991,1993,by=1),seq(1990,1993,by=1))
data<-seq(14,25,by=1)
data[6]<-NA
DF<-data.frame(Id=ids,Year=years,Data=data)
DF
Id Year Data
1 1234 1990 14
2 1234 1991 15
3 1234 1992 16
4 1234 1993 17
5 1234 1994 18
6 5436 1991 NA
7
2010 May 05
1
extracting a matched string using regexpr
Given a text like
I want to be able to extract a matched regular expression from a piece of
text.
this apparently works, but is pretty ugly
# some html
test<-"</tr><tr><th>88958</th><th>Abcdsef</th><th>67.8S</th><th>68.9\nW</th><th>26m</th>"
# a pattern to extract 5 digits
> pattern<-"[0-9]{5}"
#
2006 Jul 06
3
Comparing two matrices [Broadcast]
It might be a bit faster to do matrix indexing:
R> tbm <- as.matrix(tb) # turn it into a character matrix
R> tmat[cbind(match(tbm[,2], rownames(tmat)), match(tbm[,1],
colnames(tmat)))] <- 1
> tmat
Apple Orange Mango Grape Star
A 1 1 1 0 0
O 1 1 0 0 0
M 0 0 1 0 0
G 0 0 0 0 0
S 1 1 1 0
2006 Jul 06
3
Comparing two matrices
hi:
I have matrix with dimensions(200 X 20,000). I have
another file, a tab-delim file where first column
variables are row names and second column variables
are column names.
For instance:
> tmat
Apple Orange Mango Grape Star
A 0 0 0 0 0
O 0 0 0 0 0
M 0 0 0 0 0
G 0 0 0 0 0
S 0 0 0 0 0
2010 Aug 09
3
New build 2.0.5
Just applied some changes from Adam and Dylan and uploaded a new build. Good
stuff guys, thanks.
Get 2.0.5 here:
http://github.com/mapstraction/mxn/downloads
Derek
--
Derek Fowler
m. +44 (0) 7966 512 369
e. dezfowler at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2005 Apr 15
4
function corresponding to map of perl
Is there a function in R that corresponds to the
function ``map'' of perl?
It could be called like:
vector.a <- map( vector.b, FUN, args.for.FUN )
It should execute for each element ele.b of vector.b:
FUN( vector.b, args.for.FUN)
It should return a vector (or data.frame) of the results
of the calls of FUN.
It nearly works using:
apply( data.frame( vector.b ), 1, FUN,