similar to: managing data and removing lines

Displaying 20 results from an estimated 700 matches similar to: "managing data and removing lines"

2011 May 16
2
wireframe advice - with reproducible code
Dear List, i am trying to produce a 3d plot using wireframe using the code: wireframe(Residuals_FD ~ Elevation * Temperature, data = data2, scales = list(arrows = FALSE), drape = TRUE, colorkey = TRUE) As you can see when the code (using the data below) is run the plot area is set-up correctly but the actual surface is missing? Any help would be greatly appreciated. Chris #data Elevation
2006 Oct 15
1
gamma distribution don't allow negative value in GLMs?
Dear friends, when i use glm() to fit my data, i use glm(formula = snail ~ vegtype + mhveg + humidity + elevation + soiltem, *family = Gamma(link = inverse),* data =a,)) It shows: error in eval(expr, envir, enclos) : *gamma distribution don't allow negative value*. But i use result<-glm(formula = snail ~ vegtype + mhveg + humidity + elevation + soiltem, family = poisson, data =a) #this
2004 Nov 09
1
gdist and gower distance
Dear All, I would like to ask clarifications on the gower distnce matrix calculated by the function gdistin the library mvpart. Here is a dummy example: > library(mvpart) Loading required package: survival Loading required package: splines mvpart package loaded: extends rpart to include multivariate and distance-based partitioning > x=matrix(1:6, byrow=T, ncol=2) > x [,1]
2006 Mar 08
1
function gdist, dist and vegdist in mvpart
Dear R community, I am analyzing plant communities with the function mvpart, using a dissimilarit matrix as input. The matrix is calculated with the funtion gdist. fit <- mvpart(gdist (ba12[,18:29], meth="maximum", full=TRUE, sq=F) ~ beers + slope_dem + elev_dem+ plc_dem + pr_curv+ +curv+max_depth+doc_rocks+ abandon+land_use+ca_old, data=ba12, xv="p") This
2010 Feb 26
2
Error in mvpart example
Dear all, I'm getting an error in one of the stock examples in the 'mvpart' package. I tried: require(mvpart) data(spider) fit3 <- rpart(gdist(spider[,1:12],meth="bray",full=TRUE,sq=TRUE)~water+twigs+reft+herbs+moss+sand,spider,method="dist") #directly from ?rpart summary(fit3) ...which returned the following: Error in apply(formatg(yval, digits - 3), 1,
2006 Nov 17
3
gower distance calculation
Hello I have 2 rows in a matrix and I want to calculate the Gower Distance between the 2 , how can I do it? I searched and found nothing that can help me, and my program doesn't know the gdist function and I couldn't find it on the R help site. Can anyone help me plz Thank u all [[alternative HTML version deleted]]
2005 Aug 12
6
evaluating string variables
Hello!!! I have a folder (C:/R/) with matrix files, named by number, i.e. 0.mat, 1.mat,...,1250.mat. In this case, they are 5x5 simetric matrices. I would like to compute a property for each matrix and put calculated values into a data frame for posterior ploting and printing. Below there is an example for 7 matrices (0.mat..6.mat) #define data frame L <- data.frame(frame=numeric(7),
2011 May 09
2
Using NULL to my data?
Dear R users, I am reading data from a file where there are some missing that are represented by -9999.00. I am using the command below. =====My original data =========== PARM = TMPC;T12X;T12N;DWPC;PALT;SKNT;DRCT;P24M;CLCL STN YYMMDD/HHMM TMPC T12X T12N DWPC PALT SKNT DRCT P24M CLCL 820420 110429/1200 22.50 -9999.00
2010 Nov 19
2
Calculating distance between longitude,latitude of 2 points
Hi all, I would like to know a way of calculating the distance between 2 points when I already have the longitude and latitude of the points. For example : Point 1 : 52? 9'54.00"N 4?25'8.40"E Point 2 : 52?27'46.80"N 4?33'18.00"E Distance between point 1 and point in km .... Is there any functions already available for this ? Any help will be much
2015 May 14
3
comportamiento de data.table al hacer calculos por grupos
Estimada comunidad tengo un problema del que no encuentro datos que me ayuden mucho en la web. Estoy haciendo calculos por grupos con data,table. Tengo un archivo (zp.res) con tres columnas que clasifican los datos (sol, con, dia) y una columna de datos numericos (media), de la siguiente forma: sol con dia media 1: con 0 1 -22.6 2: con 0 1 -36.6 3: con 0 1 -35.6 y
2008 Jul 29
1
Howto Draw Bimodal Gamma Curve with User Supplied Parameters
Hi, Suppose I have the following vector (data points): > x [1] 36.0 57.3 73.3 92.0 300.4 80.9 19.8 31.4 85.8 44.9 24.6 48.0 [13] 28.0 38.3 85.2 103.6 154.4 128.5 38.3 72.4 122.7 123.1 41.8 21.7 [25] 143.6 120.2 46.6 29.2 44.8 25.0 57.3 96.4 29.4 62.9 66.4 30.0 [37] 24.1 14.8 56.6 102.4 117.5 90.4 37.2 79.6 27.8 17.1 26.6 16.3 [49] 41.4 48.9 24.1
2009 Aug 13
1
R code to reproduce (while studying) Bates & Watts 1988
Hi R users, I'm here trying to understand correlated residuals in nonlinear estimation. I'm reading/studying the book Bates, D. M. and D. G. Watts, (1988), /Nonlinear regression analysis and its applications/, Wiley, NY. pages 92-94, trying to reproduce the figures and to find out the code in R to perform the necessary calculations. I also consulted Pinheiro and Bates, but without
2013 May 18
2
Intervalos de confianza en una autocorreloción
Hola: ¿Existe alguna forma de obtener el valor numérico de los intervalos de confianza en una autocorrelación? O, por el contrario, ¿tengo que calcularlos «a mano»? (Llevo ya un rato buscando y nada.) Gracias por adelantado. Salud y Revolución. Lobo. -- Libertad es poder elegir en cualquier momento. Ahora yo elijo GNU/Linux, para no atar mis manos con las cadenas del soft propietario.
2006 Aug 13
1
Gower Similarity Coefficient
I'm interested in clustering my data using the Gower Similarity Coefficient, and I was wondering if R is capable of using that metric Timothy Rye [[alternative HTML version deleted]]
2018 Mar 05
0
Interpret List Label as Date from Quantmod getOptionChain
On 5 March 2018 at 03:13, Sparks, John wrote: | library(quantmod) | #in fairness, I did not include this last time and my example was therefore not reproducible. Apologies to Bert and everyone else #for not following the posting guidelines. | aapl_total<-getOptionChain("AAPL", NULL)> | | How could I then get the subset of the entire list which only has expiry dates in 2019, or
2006 Apr 06
1
Sorting problem
R-gurus... I've got a 5 column dataframe where I'd like to plot each ID's "b" against "c" with "b" in ascending order (within the same ID). How do I sort "b" so that the other variables are altered equally? ID a b c d 101 1 240 26.7 21.85 101 2 335 21.8 21.85 101 3 1387 26.6 21.85 101 4 877 24.1 21.85
2010 Apr 27
5
get means of elements of 5 matrices in a list
I've got a list of 5 matrices that are each 5 x 6. I'd like to end up with a 5 x 6 matrix that contains the mean value of the 5 original matrices. I can do this by brute force, but there must be a better way than making each matrix into a vector and then remaking a matrix thanks very much for any help david freedman ll=list(structure(c(9.7, 17.6, 20.8, 24.1, 33.8, 14.5, 25.7, 29.8,
2009 Sep 14
1
ggplot2 graphing multiple lines of data
Some day I may figure out how ggplot2 works. I am trying to plot 5 columns of data on a graph (similar to a simple matplot) =========================================================================== library(ggplot2) bmi <- structure(list(pct = 2:21, P10 = c(14.6, 14.5, 14.2, 13.9, 13.7, 13.7, 13.9, 14.2, 14.5, 14.8, 15.3, 15.9, 16.6, 17.2, 17.8, 18.1, 18.3, 18.4, 18.5, 18.6), P25 =
2012 Mar 04
1
hash table clean-up
Hello, I have noticed that the memory usage inside an R session increases as more and more objects with unique names are created, even after they are removed. Here is a small reproducible example: > gc() used (Mb) gc trigger (Mb) max used (Mb) Ncells 531720 14.2 899071 24.1 818163 21.9 Vcells 247949 1.9 786432 6.0 641735 4.9 > > for (i in 1:100000) { + name <-
2017 Oct 05
0
dealing with a messy dataset
It looks like fixed width. I just used the last position of each field to get the size and used the 'readr' package; > input <- "And XVIII 000214.5+450520 0.69 17 9 0.00 -8.7 26.8 6.44 6.78 < 6.65 -44 0.5 MESSIER031 0.6 1.54 + PAndAS-03 000356.4+405319 0.10 17 0.00 -3.6 27.8 4.38 2.8 MESSIER031