search for: grd

Displaying 20 results from an estimated 40 matches for "grd".

Did you mean: gd
2009 Apr 01
3
How to prevent inclusion of intercept in lme with interaction
...t in (newone ~ t*treat-1). What's wrong? Some bracket missing? I tried a few variants. Dieter Menne #-------------------------------- library(nlme) library(lattice) # Generated data set.seed(4711) subject = as.factor(letters[1:5]) varslope = rnorm(length(subject),0,0.02) cslope = c (0.1,0.15) grd = expand.grid(t=seq(5,15,by=5), subject=subject,treat=c("contr","test")) grd$slope = varslope[grd$subject] + cslope[grd$treat] grd$newbone = grd$slope*grd$t+rnorm(nrow(grd),0,0.2) xyplot(newbone~t|treat,groups=subject,data=grd, type="l",xlim=c(0,20),ylim=c(0,...
2011 May 23
3
Get contour of a map
Hello everybody, I search a function which returns the contour of map with levels like contourLines, but I would like this function return the border of the map too, because the function contourLines cannot consider the corner of the map and it is not adapted to fill polygon after that. Thanks in advance Pierre Bruyer
2013 Apr 24
0
help with execution of 'embarrassingly parallel' problem using foreach, doParallel on a windows system
...e(d,e,f,g) names(one) <- c('block1', 'ind', 'res','block2') one[1:50,] two <- expand.grid(one[,1], one[,4]) #actually is expand.grid(unique(one[,1]), unique(one[,4])) str(two) names(two) <- c('block1', 'block2') fitting <- function(ndx.grd=two,dt.grd=one,ind.vr='ind',rsp.vr='res') { ind.start<-10^8 item.out <- matrix(NA, ncol=3) for(i in 1:length(ndx.grd[,1])){ tmp1 <- as.character(ndx.grd[i,1]) tmp2 <- as.character(ndx.grd[i,2]) wk.grd <- dt.grd[as.character(dt.grd[,1])==tmp1 & as.character(dt.grd...
2008 Feb 04
1
how to get points from SpatialPolygonsDataFrame
Um texto embutido e sem conjunto de caracteres especificado associado... Nome: n?o dispon?vel Url: https://stat.ethz.ch/pipermail/r-help/attachments/20080203/5ea1e3ad/attachment.pl
2011 Oct 04
0
matrix of chi-square results for all combinations of data frame
...ciate any advice. Sample code below. Thanks in advance Christiaan # Sample Code # create test data df=data.frame(x=sample(0:1,100,replace=TRUE),x.1=sample(0:1,100,replace=TRUE), x.2=sample(0:1,100,replace=TRUE), x.3=sample(0:1,100,replace=TRUE)) # make a data frame of all possible combinations grd=expand.grid(colnames(df),colnames(df)) # make vector of p values pval <- for (i in 1: length(grd[,1])){ chisq.test(df[,paste(grd$Var1[[i]])], df[,paste(grd$Var2[[i]])], correct = TRUE)$p.value } # It works if I do i=3 and then chisq.test(df[,paste(grd$Var1[[i]])], df[,paste(grd$Var2[[i]])]...
2006 Jan 11
2
Levelplot not working from file
I am trying to use the levelplot function from a command file. Here is the code: library(sp) library(gstat) library(lattice) gatherData <- read.table("~/gather.txt", header = TRUE) grd = makegrid(gatherData$x, gatherData$y, cell.size = 5) k <- krige(z~x+y, ~x+y, data = gatherData, newdata = grd, nmax = 5) levelplot(var1.pred~x+y, k, aspect = mapasp(k), main = "Predicted 5m") It executes fine (it plots up) when I cut and paste to the command prompt but it seems to...
2013 Jan 02
2
Read many cvs files
...ot; "890.1 " "998.89" "650. " ... $ Diagnóstico.Ppal.completo : chr "LEIOMIOMA UTERINO SUBMUCOSO" "HERIDA ABIERTA DE CADERA Y MUSLO-COMPLICADA" "OTRAS COMPLICACIONES ESPECIFICADAS DE PROCEDIMIENTO" "PARTO NORMAL" ... $ GRD : int 359 443 453 373 796 372 14 758 450 450 ... $ Descrición..do.GRD : chr "PROC. SOBRE ÚTERO E ANEXOS POR CA.IN SITU E PROCESO NON MALIGNO SEN CC" "OUTROS PROCEDEMENTOS CIRÚRXICOS POR LESIÓN TRAUMÁTICA SEN CC" "COMPLICACIÓNS D...
2013 Apr 24
1
getting started in parallel computing on a windows OS
Dear R help, I've what I think is a fairly simple parallel problem, and am getting bogged down in documentation and packages for much more complex situations. I have a big matrix (30^5,5]. I have a function that will act on each row of that matrix sequentially and output the 'best' result from the whole matrix (it compares the result from each row to the last and keeps the
2004 Aug 22
1
latitude longitude data
...adings with bug counts (bugs meaning insects in this case) made along rows in crop fields and use these to make maps of bug distribution. The GPS readings are not quite accurate enough for my purpose, so since I know what row each reading is made in, I adjust the latitudinal coordinate using: grd<-lm(lat~lon+Row,data) data$lat<-predict(grd[,c("lon","Row")]) which adjusts the latitude pretty well when the rows run East-West, but not at all when the rows run North-South, and it doesn't adjust the longitude at all. Is there a better approach I could use to a...
2004 Jul 12
1
Errors when compiling app_radius
...e app_radius from http://appradius.minitelecom.org ? Here below my configuration : -> asterisk runing -> mysql running -> freeradius running -> Compiling cpprad : OK -> Compiling app_radius : not OK, here below my error message : "" make[1]: Quitte le r?pertoire `/home/grd/appradius/inc' make[1]: Entre dans le r?pertoire `/home/grd/appradius/src' gcc -c -I../inc -O -Wall -I/usr/local/include -g -O2 app_radius.c In file included from app_radius.c:17: /usr/include/asterisk/lock.h: In function `ast_mutex_init': /usr/include/asterisk/lock.h:173: warning: impl...
2012 Aug 07
0
R enquire
...the runtime error? Is it true that there is a limitation in the loops that R can handle? Is it because a piece of F77 code? Thank you very much in advance for your help and I hope to hear from you soon. Best wishes, Manuel. ________________________________ (1) F77 code subroutine weathersel(GRD,YR,SWJD,HRVJD) C ========================================== C ---------------------------------------------------------- C ---------------------------------------------------------- C INTEGER :: GRID,YEAR,JDAY,A,B,C,D REAL :: LAT,LONG,MINT,MAXT,TEMP REAL :: PREC,WIND,RAD,RH,DEL...
2006 Jan 12
1
"infinite recursion" in do.call when lme4 loaded only
...ncreases beyond bonds in task manager. -- I tested a few S3 based packages (MASS, nlme) and did not get similar problems Current workaround: do lme4-processing in a separate program. ------ #library(lme4) # uncomment this to see the problem np <- 12 nq <- 20 nph <- 3 nrep <- 30 grd <- expand.grid(Pat=as.factor(1:np), Q=as.factor(1:nq), Phase=as.factor(1:nph)) df <- with (grd, data.frame(Pat=Pat,Q=Q,Phase=Phase,Resp = rnorm(np*nq*nph*nrep))) score <- function(x) { data.frame(Pat=x$Pat[1],Phase=x$Phase[1],Q=x$Q[1],score = mean(x$Resp)) } #...
2006 Jan 12
1
"infinite recursion" in do.call when lme4 loaded only
...ncreases beyond bonds in task manager. -- I tested a few S3 based packages (MASS, nlme) and did not get similar problems Current workaround: do lme4-processing in a separate program. ------ #library(lme4) # uncomment this to see the problem np <- 12 nq <- 20 nph <- 3 nrep <- 30 grd <- expand.grid(Pat=as.factor(1:np), Q=as.factor(1:nq), Phase=as.factor(1:nph)) df <- with (grd, data.frame(Pat=Pat,Q=Q,Phase=Phase,Resp = rnorm(np*nq*nph*nrep))) score <- function(x) { data.frame(Pat=x$Pat[1],Phase=x$Phase[1],Q=x$Q[1],score = mean(x$Resp)) } #...
2013 Dec 02
3
legend position
Hi all. I'm ploting a raster and I can't find the proper way to move the legend. For example, r = raster(system.file("external/test.grd", package="raster"))plot(r) How can I put the legend at the desired position? Thank in advance,Phil [[alternative HTML version deleted]]
2010 Nov 02
0
spatial plots maps-ssplot
...uld like shaded gridboxes, the boxes should be filled with colour. Can anyone help me with this problem? Thank you in advance! This is part of my code: minlon<-4.5 maxlon<-12 minlat<-46.5 maxlat<-52.5 gt=GridTopology(cellcentre.offset=c(5.75,47.5),cellsize=c(2.5,2),cells.dim=c(3,3)) grd=SpatialGrid(gt,proj4string = CRS(as.character(NA))) gridparameters(grd) gd<-as.data.frame(grd,"SpatialGrid") h<-season_djf h<-as.data.frame(h) djf.att=SpatialPointsDataFrame(gd,h) gridded(djf.att)=TRUE spplot(djf.att, col.regions = colorRampPalette(c("red","orange...
2017 Nov 23
0
How to produce rainfall maps
Thank you Sarah and Mike for your explanations. My final objective is to produce maps (png image or any kind of extension I can import in LaTeX) where rainfall data are interpolated, using the Inverse Distance method or Kriging. My input file (pointfile.csv in the reported example) reports the station code, lat and long of the meteorological station and the rainfall value (which might be the
2013 Apr 23
2
SSbiexp
Hello all! I have a problem to use a biexponential regression model: I use this code: n3<-nls(proc~SSbiexp(cls,a,b,c,d),data=bline) and this is the error message: Error in nls(y ~ cbind(exp(-exp(lrc1) * x), exp(-exp(lrc2) * x)), data = xy, : singular gradient My data is like this: structure(list(proc = c(387.177462830167, 508.090511433077, 321.836817656365, 151.226805860727,
2004 Apr 15
2
T1 Line install.. (UK Muppet)
...DS1: - CO Incoming Start Signaling for calls originating at the PBX (ISTARTSG) Start Signal expected by the PBX, sent by the CO telling the PBX to begin sending digits to the CO for collection. - Wink Start, Delay Dial, Immediate Dial, Dialtone, Loop Start, Grd Start - CO Incoming Digit Pulsing for calls originating at the PBX (IPULSTYP) Type of digits sent from the PBX to CO after the PBX receives the start signal (ISTARTSG) from the CO - Dial Pulse, DT/ DTMF, MF, NP/No Pulsing - CO Outgoing Start Signaling for calls terminatin...
2011 Jul 13
3
adding text to spplot
hi all, I have a plot to which i would like to add text labels. And i cant find a way...here is the code : enaD2<-idw(D2~1, loca=dva, newdata=grd) pts = list("sp.points", dva, pch = 20, cex=1.5, col = "darkred spplot(enaD2, "var1.pred",sp.layout=pts, main = "globina 60 cm", sub="D2", col.regions=terrain.colors(64), contour=T) text information is in ena$ime fiel...
2017 Nov 22
2
How to produce rainfall maps
Fwiw the engine behind geom_raster needs explicit observation-per-row form for input (with no structural normalization), so conversion to points is perfectly proper here, albeit confusing in context. (It's closer to what graphics devices actually use ultimately, but the expansion is laid out very early in ggplot2 because there's no standard for intermediate forms.) Cheers, Mike On Wed,