search for: deg

Displaying 20 results from an estimated 384 matches for "deg".

Did you mean: de
2012 Nov 20
2
[lattice] how to overlay a geographical map on a levelplot?
r-help lattice adepts: I have a question which is somewhat geospatial, so I posted to r-sig-geo rather than here: https://stat.ethz.ch/pipermail/r-sig-geo/2012-November/016757.html > summary: How to overlay a geographical map on each panel in a lattice > (or Trellis), e.g., of levelplot's? Note I am not inquiring about > creating choropleth maps[,] which Sarkar 2008 covers quite
2013 Mar 05
2
Function completely locks up my computer if the input is too big
...it) on a windows 7 machine with 4 mb RAM. In the meantime I suppose I'll write a loop to do this function piece-wise for larger data and see if that helps. Script is attached and appended below. Thanks Ben Caldwell #compass to polar coordinates compass2polar <- function(x) {-x+90} #degrees (polar) to radians Deg2Rad <- function(x) {(x*pi)/180} # radians to degrees Rad2Deg <- function (rad) (rad/pi)*180 # polar to cartesian coordinates - assumes degrees those from a compass. output is a list, x & y of equal length Pol2Car <- function(distance,deg) { rad &lt...
2000 Nov 20
1
Bug in stars.R (PR#739)
...= FALSE, draw.axes = FALSE, ...) { if (is.data.frame(x)) x <- as.matrix(x) else if (!is.matrix(x)) stop("x must be a matrix or a data frame") if (!is.numeric(x)) stop("data in x must be numeric") n.loc <- nrow(x) n.seg <- ncol(x) deg <- pi/180 seg.colors <- if (!is.null(colors)) colors else 1:n.seg if (is.null(locations)) { mat.dim <- ceiling(sqrt(n.loc)) temp.loc.1 <- rep(x = 2.1 * 1:mat.dim, times = mat.dim, length = n.loc) temp.loc.2 <- rep(x = 2.1 * mat.dim:1, rep...
2010 Oct 20
4
Changing sign on absolute numbers 0 problems
Hi, I am trying to do some calculations turning DMS data to decimal degrees using the formula (D+(M/60)+(S/3600)), some of the D's involve -ve numbers, the easiest way to do the calculation is to use absolute numbers then use the 'sign' function in R to change the answer back to the correct -ve or +ve, for example, if; D<--69 M<-8 S<-10 then de...
2005 Jun 02
0
How to calculate the correct SE in a nested or spliplot anova?
...r spliplot anova? Nested example: --------------------- m <- aov(Glycogen~Treatment+Error(Treatment/Rat/Liver)) > m Call: aov(formula = Glycogen ~ Treatment + Error(Treatment/Rat/Liver)) Grand Mean: 142.2222 Stratum 1: Treatment Terms: Treatment Sum of Squares 1557.556 Deg. of Freedom 2 Estimated effects may be unbalanced Stratum 2: Treatment:Rat Terms: Residuals Sum of Squares 797.6667 Deg. of Freedom 3 Residual standard error: 16.3061 Stratum 3: Treatment:Rat:Liver Terms: Residuals Sum of Squares 594 D...
2006 Feb 08
1
ERROR: no applicable method for "TukeyHSD"
...eyHSD(aov) : no applicable method for "TukeyHSD" In case it helps: > aov Call: aov(formula = roi ~ (Cue * Hemisphere) + Error(Subject/(Cue * Hemisphere)), data = roiDataframe) Grand Mean: 8.195069 Stratum 1: Subject Terms: Residuals Sum of Squares 645.7444 Deg. of Freedom 7 Residual standard error: 9.604645 Stratum 2: Subject:Cue Terms: Cue Residuals Sum of Squares 0.386987 4.015740 Deg. of Freedom 1 7 Residual standard error: 0.7574148 1 out of 2 effects not estimable Estimated effects are balanced Stra...
2013 Oct 18
1
read table and import of a text file
Hi, Assuming that you provided the sample data from the file. temp <- readLines(textConnection("#Hogd/met, Temp, 005[M], Value #Hogd/met, Difftemp, 051[M], Value BA0+ 1 MTEMP005 1 [deg.C] 2 MDTMP051 1 [deg.C] EOH 891231, 2400, -1.5, -0.21, 900101, 0100, -1.4, -0.25, 900101, 0200, -1.6, -0.28, 900101, 0300, -1.7, -0.25, 900101, 0400, -2.1, -0.0999999, 900101, 0500, -2.3, -0.0899999, 900101, 0600, -2.4, -0.21, 900101, 0700, -2.5, -0.28, 900101, 0800, -2.6, -0.3, 900101, 0900, -2.8,...
2008 Dec 26
2
question about SNA in R, thanks!
Dear colleagues, I'm trying to have a look at the Assortative and Disassortative ( http://en.wikipedia.org/wiki/Assortative_mixing) of the network I have. But it seems that the igraph hasn't mentioned that yet. I have to get the in/out degree of the vertices of each edge and calculate the Pearson's Correlation coefficient which seems to be quite a huge task for me. :( So I wonder if anyone had done that before and give me some hints on it? Thank you in anticipation! Weijia [[alternative HTML version deleted]]
2010 Jun 11
1
Documentation of B-spline function
Goodmorning, This is a documentation related question about the B-spline function in R. In the help file it is stated that: "df degrees of freedom; one can specify df rather than knots; bs() then chooses df-degree-1 knots at suitable quantiles of x (which will ignore missing values)." So if one were to specify a spline with 6 degrees of freedom (and no intercept) then a basis with 6-3-1 =2 internal knots should be creat...
2011 Dec 21
1
Gps fraction of degrees function
...ic(strsplit(strsplit(strsplit(coords, "°")[[1]][2], "'")[[1]][2], "\"")[[1]][1]) [1] 48.58 > strsplit(strsplit(strsplit(coords, "°")[[1]][2], "'")[[1]][2], "\"")[[1]][2] [1] "N" My code gets from the coords degrees , minutes, seconds and finally the N/S/W/E Could you please tell me if there is any function in R that can convert all the above into fractions of degrees (single numerical value). B.R Alex [[alternative HTML version deleted]]
2009 Jan 04
1
POSIXct and chron issues with tz
...ve different date formats and different times zones. I need to match up the date/time of the datasets and then invoke a conditional statement, such as: if dataC$mph is >= 12 then keep dataM$co23 for the corresponding time/date stamp. snippets of data files: *dataC.txt* LST in mph Deg DegF DegF2 % volts Deg mph2 w/m2 0506010000 0.00 13.6 218.1 36.8 -999 65.1 -999 -999 18.2 0.2 0506010005 0.00 12.9 214.3 36.8 -999 65.5 -999 -999 16.9 0.2 0506010010 0.00 14.4 215.7 36.9 -999 65.4 -999 -999 20.4 0.2 *da...
2009 Jun 26
1
The Claw Density and LOCFIT
...cannot find it on the web anymore. The code in the .R script file does not work either. Could anybody please direct me in finding an updated version of this document, or help me correct the code given in the file. The (out-of-date) code is as follows: data(claw54) fit1 <- locfit( ~ claw54, deg = 0, kern = "gauss", alpha = c(0, 0.315), ev = grid(100, ll = -3.5, ur = 2.7)) fit2 <- locfit( ~ claw54, deg = 0, kern = "gauss", alpha = c(0, 0.985), ev = grid(100, ll = -3.5, ur = 2.7)) x <- seq(-3.5, 2.7, length.out = 200) y <- dnorm(x, -1., 0.1) + dnor...
2005 Dec 21
1
How do I edit the x-axis on a time series plot?
...2". I have not provided the data for the sake of brevity although it is readily available at http://www.bath.ac.uk/~mascc/Recife.TS Can anyone help? recife <- as.vector(t(recife))<> RecfS <- ts(recife, start = c(1953,1), frequency = 12) <> plot(RecfS, ylab = ?Temperature (deg C)?, xlab = ?Year?, main = ?Average air temperature (deg C) at Recife, Brazil, in successive months from 1953 to 1962?, adj = 0.5) Thanks, Philip Turk <>
2010 Feb 07
2
predicting with stl() decomposition
...es[1] <- noise[1] for(i in 3:300){ series[i] <- 0.5*series[i-1]+ noise[i] + 0.01*time[i] } seriesTs <- ts(series, start=c(1980,1), frequency=12) decomp <- stl(seriesTs ,"periodic") plot(decomp) llrSaison <- loess(seriesTs~time , span=decomp$win[1] , degree=decomp$deg[1]) llrTrend <- loess(seriesTs~time, span=decomp$win[2] , degree=decomp$deg[2]) plot(llrSaison$fitted) The last plot differs much from the seasonal plot in the plot(decomp) call. This is why the llr estimator doesn’t extract the seasonal component, but how can I predict...
2003 May 08
2
natural splines
Apologies if this is this too obscure for R-help. In package splines, ns(x,,knots,intercept=TRUE) produces an n by K+2 matrix N, the values of K+2 basis functions for the natural splines with K (internal) knots, evaluated at x. It does this by first generating an n by K+4 matrix B of unconstrained splines, then postmultiplying B by H, a K+4 by K+2 representation of the nullspace of C (2 by K+4),
2012 Mar 19
2
fitted values with locfit
...BMI=m1(RCC)+m2(WCC) where (m1) and (m2) are unknown smooth functions. My problem is that once I get the regression done I cannot get the fitted values of each of this smooth functions (m1) and (m2). What I write is the following library(locfit) data(ais) fit2<-locfit.raw(x=lp(ais$RCC,h=0.5,deg=1)+lp(ais$WCC,deg=1,h=0.75),y=ais$BMI,ev=dat(),kt="prod",kern="gauss") g21<-predict(fit2,type="terms") If I done this on the computer the results of (g21) is a vector when I should have a matrix with 2 columns (one for each fitted smooth function). Please, someb...
2008 Feb 07
1
ANOVA and lmer
...ons. So, I have two different factors : a fixed effect (Colour with two levels) and a random one (Population with 9 levels). I first analyzed the data with the aov function LargS is the variable aov(formula = LargS ~ Col + Error(Col/Pop)) Terms: Col Sum of Squares 3.440351 Deg. of Freedom 1 Estimated effects are balanced Stratum 2: Col:Pop Terms: Residuals Sum of Squares 3017.112 Deg. of Freedom 16 Residual standard error: 13.73206 Stratum 3: Within Terms: Residuals Sum of Squares 3347.385 Deg. of Freedom 30...
2004 Nov 02
0
how to call function in ../src/main
...s Kotien Wu from NIH/NCI. We want to use R function for our web: http://cgap.nci.nih.gov It works for functions in R/R-1.9.1/src/nmath/standalone very well. We have function GetPvalueForT.c which has #define MATHLIB_STANDALONE 1 #include <Rmath.h> double GetPvalueForT ( double t, double deg ) { return 2 * pt(t, deg, 0, 0); } We create GetPvalueForT.i, which has /* File : GetPvalueForT.i */ %module GetPvalueForT extern double GetPvalueForT ( double t, double deg ); We use GetPvalueForT: $(srcdir)/GetPvalueForT.c swig -perl5 GetPvalueForT.i gcc $(ALL_CPPFLAGS) $...
2005 Apr 14
1
LOCFIT: What's it doing?
...code', I came to realize LOCFIT is not quite doing what I want. I wrote the following example script: #----------------------------------------------------------------------------------------------------------------- # Plain Vanilla NADARAYA-WATSON estimator (or Local Constant regression, e.g. deg=0) # with gaussian kernel & fixed bandwidth mkern<-function(y,x,h){ Mx <- matrix(x,nrow=length(y),ncol=length(y),byrow=TRUE) Mxh <- (1/h)*dnorm((x-Mx)/h) Myxh<- (1/h)*y*dnorm((x-Mx)/h) yh <- rowMeans(Myxh)/rowMeans(Mxh) return(yh) } # Generating the design Y=m(x)+e n <- 10 h...
2009 Aug 04
0
Writing a NetCDF file in R
...") mrunoff_1993 <- get.var.ncdf(netcdf_1993_temp, "mrunoff") mrunoff_1994 <- get.var.ncdf(netcdf_1994_temp, "mrunoff") mrunoff_1995 <- get.var.ncdf(netcdf_1995_temp, "mrunoff") # Define variable dimensions dimx <- dim.def.ncdf("Lon", "deg E", as.double(longitude)) dimy <- dim.def.ncdf("Lat", "deg N", as.double(latitude)) month <- dim.def.ncdf("Mon", "Months: Jan 86=1, Dec 95=120)", 1:120) year <- dim.def.ncdf("Year", "year", year) # Assign data: extract mruno...