similar to: using names() as a variable in a formula

Displaying 20 results from an estimated 1000 matches similar to: "using names() as a variable in a formula"

2009 Jun 22
3
Calculating "row standard deviations"
Hi R-helpers, I have been struggling with calculating row and column statistics, e.g. standard deviation. I know that > datac$Mean<-rowMeans(datac,na.rm=TRUE) will give me row means. I have tried to replicate those row means with the apply function: > datac$Mean2<-apply(datac,2,mean) so that I can replace the function argument with "sd" (instead of mean) to get standard
2007 Jul 24
1
Fit t distribution
Hi all, I am trying to fit t distribution using the function "tFit" in the library(fBasics). I am using the code tFit(datac[[2]]) and it returns the following list. Title: Student-t Parameter Estimation Call: tFit(x = datac[[2]]) Model: Student-t Distribution Estimated Parameter(s): df 78.4428 I just wonder how can I refer to the estimated parameters. I tried
2009 Jan 04
1
POSIXct and chron issues with tz
Dear All- I am trying to merge two data files - they have 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
2010 Dec 07
2
robustbase problem [bug?] in adjbox function.
hello list, i'm a bit puzzled by the error message i get when i copy past this in R:
2005 Nov 08
2
Variogram
Dear All, Is there anybody has the experience in using variogram(gstat) ? Please kindly give me some hints about the results. I used variogram() to build a semivariogram plot as: tr.var=variogram(Incr~1,loc=~X+Y,data=TRI2TU,width=5) then fir the variogram to get the parameters as: v.fit = fit.variogram(tr.var,vgm(0.5,"Exp",300,1)) v.fit model psill range 1 Nug 1.484879
2008 Aug 05
4
LIDAR Problem in R (THANKS for HELP)
Hi All, I am a PhD student in forestry science and I am working with LiDAR data set (huge data set). I am a brand-new in R and geostatistic (SORRY, my background it?s in forestry) but I wish improve my skill for improve myself. I wish to develop a methodology to processing a large data-set of points (typical in LiDAR) but there is a problem with memory. I had created a subsample data-base but
2003 Oct 02
1
Are package maintainers responsible for name-mangling class names?
The following came up when Roger Bivand and I discussed R's name spaces and overlap in packages, in the bus to the field trip during StatGIS, last Tuesday: If two packages create the same class, say "variogram", and both are loaded, then using a method for an object of class "variogram" cannot discriminate between them and will call the method in the package loaded last.
2006 Mar 13
2
Error Message from Variogram.lme Example
When I try to run the example from Variogram with an lme object, I get an error (although summary works): R : Copyright 2005, The R Foundation for Statistical Computing Version 2.2.1 (2005-12-20 r36812) ISBN 3-900051-07-0 ... > fm1 <- lme(weight ~ Time * Diet, BodyWeight, ~ Time | Rat) Error: couldn't find function "lme" > Variogram(fm1, form = ~ Time | Rat, nint =
2017 Sep 24
1
R version 3.3.2, Windows 10: gstat package: Error in fitting a variogram model using 'fit.variogram' function
Dear Members, I am trying to fit a variogram model using fit.variogram function from the gstat package. The figure showing my experimental variogram can be seen here: https://i.stack.imgur.com/UZXw4.png My code line for this operation is: > c2.vgm.fit<-fit.variogram(c2.vgm.exp,vgm(nugget=0, psill=400,model="Exp",range =40000),fit.method = 7) The system throws following error
2001 Oct 18
1
Sgeostat module
Dear Users, I use Sgeostat to calculate co variogram (function est.variogram with two variables). If i inverse the 2 variables in the functions, the co variogram change! Normaly it is symmetric, isn't it? Someone could me explain why, or give me an idea to calculate co variogram in a easy way... Thanks in advance Laurent ps : sorry for my english Laurent William Dubroca Centre de
2006 Jun 03
1
default value for cutoff in gstat variogram()
I wonder what is the default value for the argument 'cutoff' when not specified in the variogram.formula function of gstat. Computing variogram envelops within gstat, I am comparing the results obtained with variog in geoR and variogram in gstat, and it took me a while before understanding that the cutoff default value is not the maximum distance. Can Edzer tell us about it? All the
2009 Mar 09
1
Zero distance error in corSpatial - correlation structure using lme
Hello, I am having a problem specifying the correlation structure in lme which leads to the error: Error in getCovariate.corSpatial(object, data = data) : Cannot have zero distances in "corSpatial". I have specified a grouping variable which is the only fix I could find by searching this error on R-help. ISee the below example. When my samples (tran) - which are transects
2006 Nov 24
2
plot() and Jpeg() increase font size and resolution
Dear list, I am having troubles increasing the fontize when plotting a variogram{gstat} and its model (vgm) with plot and using jpeg(). Also the resolution in the jpeg call does not work. I am using R2.4 on Mandriva 10.2 linux. I can change fontsize with cex.axis in a normal plot, so I presume it has to do with plotting the variogram model. Any help on how to increase the font size and
2015 Aug 04
2
Duda interpolación (package ' gstat ')
Hola, # Hacemos el KED. Ver función "krige()": KED.rad <- krige( formula=pluvPcp~layer, # covariable -> radar locations=lluvia.rad.pluv.spdf, newdata=radarGrid, # podría ser cualquier objeto Spatial model=v.fit, # modelo de semivariograma. maxdist=Inf
2010 Dec 20
2
How to optimize function parameters?
Hi, I have a dataset and I want to fit a function to it. The function is variogram model (http://en.wikipedia.org/wiki/Variogram) The variogram model is defined by three parameters and I want them to be automatically optimized for real time data. I tried to use gafit {gafit} for this, but there are some data configuration, where optimal results given by gafit() are negative, which is not correct
2003 Mar 07
1
REML option in gstat
Hi, please help!! I've been trying to fit variogram models using the REML method in the gstat package. Every time the Windows GUI crashes. For example library(gstat) data(meuse) x <- variogram(zinc ~ 1, ~x + y, meuse) v <- vgm(140000, "Sph", 800, nug = 10000) plot(x, model = fit.variogram(x, model = v, fit.method=5)) Other fit methods are non problematic (eg. fit.method=7
2008 Apr 29
2
Variogram problem
Hello, I'm french and I have some difficulties in carry out the semiones under R with an aim to carry out an interpolation by krigeage. My goal is to obtain a chart of the distribution of precipitations/temperatures in Europe starting from 73 different stations (and, of course, distributed irregularly on the chart, where use of the krigeage). Here, I carried out this to test to obtain
2005 Nov 09
2
Variograms and large distances
Hello R list, I need to compute empirical variograms using data from a large geographic area (~10^6 km2). Although I could not find a specific reference, I assume that both geoR and gstat calculate distances among data points assuming points are on a flat surface (using the Pythagorean Theorem). Because the location of my data is large and located near the pole, assuming that latitude and
2009 Mar 24
1
Variogram with Gstat
Dear all can you help me? i have this problem: i have a dataset in a text file in a matrix of 3 columns: x, y, z where x and y are the coordinates and Z are the mesurements. How can i do a variogram with R?
2002 Feb 13
1
nlme package dependencies?
Dear R-help, The following nlme example, from help(Variogram.gls), does not work on my system. > data(BodyWeight) > fm1 <- gls(weight ~ Time * Diet, BodyWeight) > Variogram(fm1, form = ~ Time | Rat)[1:10,] Error in FUN(X[[1]], ...) : unused argument(s) (method ...) It looks like I might not have loaded a necessary package. I did load nls and lattice (the latter not actually being