similar to: raster::levels() not working in packaged function.

Displaying 20 results from an estimated 1300 matches similar to: "raster::levels() not working in packaged function."

2020 Oct 31
0
[R-sig-Geo] raster::levels() not working in packaged function.
Many thanks, That worked, since the NAMESPACE file incudes a warning about editing it directly I ysed the reoygen tag in the fucntion script #' @import raster. On Sun, 1 Nov 2020 at 00:18, Marcelino de la Cruz Rot < marcelino.delacruz at urjc.es> wrote: > Maybe including > > import(raster) > > or > > importFrom("raster", "levels") > > in
2020 Sep 10
5
aplicar codigo
Hola: Como dice Carlos, algo así, por ejemplo: transforma <- function(df) sapply(df, function(x) ifelse(x%in%c("x1","x2","x3"), "prueba1",ifelse(x%in%c("x4","x5","x6"),"prueba2",x))) > transforma(df1)       col1  [1,] "prueba1"  [2,] "prueba1"  [3,] "x11"  [4,]
2020 Sep 10
2
aplicar codigo
Yo copio y pego este código y me sale correctamente. Se me ocurre que pueda deberse a la versión de R ¿cuál usas? El 10/09/2020 a las 17:51, Samura . escribió: > Gracias por las respuestas. > > Probé lo de hacer la función y no me salía. Pensaba que hacía algo mal. > Ahora con el código de Marcelino tampoco me sale. > > col1 <- c('x1', 'x2', 'x11',
2019 Sep 06
2
Dibujar un triángulo dadas la distancias de los segmentos.
Pregunta, ?Como puedo leer datos de SPSS con R studio? Obtener Outlook para Android<https://aka.ms/ghei36> ________________________________ From: R-help-es <r-help-es-bounces en r-project.org> on behalf of Juan Abasolo <juan.abasolo en ehu.eus> Sent: Thursday, September 5, 2019 11:28:37 AM To: Carlos Ortega <cof en qualityexcellence.es> Cc: R-help-es <r-help-es en
2019 Sep 05
2
Dibujar un triángulo dadas la distancias de los segmentos.
Mira aquí como se soluciona... https://www.triangle-calculator.com/?what=sss&a=47&b=45&c=55&submit=Solve Saludos, Carlos Ortega www.qualityexcellence.es El jue., 5 sept. 2019 a las 13:17, Marcelino De La Cruz Rot (< marcelino.delacruz en urjc.es>) escribió: > Hola Juan: > > El 05/09/2019 a las 0:19, Juan Abasolo escribió: > > Buenas, compañeros; > >
2019 Sep 06
5
Leer fichero de SPSS...
Gracias. Es necesario instalar "forecast"?? Obtener Outlook para Android<https://aka.ms/ghei36> ________________________________ From: Carlos Ortega <cof en qualityexcellence.es> Sent: Friday, September 6, 2019 1:37:08 PM To: Christopher Estrada Ruiz <christopher_estrada_ruiz en hotmail.com> Cc: Juan Abasolo <juan.abasolo en ehu.eus>; R-help-es <r-help-es en
2012 May 20
5
removeing only rows/columns with "na" value from square ( symmetrical ) matrix.
I have some square matrices with na values in corresponding rows and columns. M<-matrix(1:2,10,10) M[6,1:2]<-NA M[10,9]<-NA M<-as.matrix(as.dist(M)) print (M) 1 2 3 4 5 6 7 8 9 10 1 0 2 1 2 1 NA 1 2 1 2 2 2 0 1 2 1 NA 1 2 1 2 3 1 1 0 2 1 2 1 2 1 2 4 2 2 2 0 1 2 1 2 1 2 5 1 1 1 1 0 2 1 2 1 2 6 NA NA 2 2 2 0 1 2 1 2 7 1 1 1 1 1 1 0 2 1 2 8
2010 May 04
7
How to replace all <NA> values in a data.frame with another ( not 0) value
I need to replace <NA> occurrences in multiple columns in a data.frame with "000/000" how do I achieve this? Thanks Nevil Amos
2012 Apr 10
7
How to remove $ (Dollar sign) from string
How do I remove a "$" character from a string sub() and gsub() with "$" or "\$" as pattern do not work. > sub("$","","ABC$DEF") [1] "ABC$DEF" > sub("\$","","ABC$DEF") Error: '\$' is an unrecognized escape in character string starting "\$" >
2012 Jan 21
2
replacing "+" in string
I am trying to replace "+" in a string with another character I am getting odd results using sub and gsub > X<-"one + two" > gsub("+","plus",X) [1] "plusoplusnpluseplus plus+plus plustpluswplusoplus" > sub("+","plus",X) [1] "plusone + two" > X<-"one ~ two" it seems to work fine with other
2011 Oct 16
2
How to plot CI's (llim ulim) on ecodist mgram
I would like to put confidence intervals on a mantel corellogram they are already calculated in the pmgram object but I am unsure how I get the x value in order to plot them? package(ecodist) X<-1:100 Y<-rnorm(1:100) Z<-rnorm(1:100) XY<-dist(data.frame(X,Y)) YX<-dist(data.frame(Y,X)) my.mgram<-mgram(XY,XZ) plot(my.mgram) print(my.mgram) > print(my.mgram) $mgram
2013 Aug 27
1
return the name of source.
Is there a fuction that will allow me to retrun the filename for a script from within that script. fir instance If I have a script "myscript.r": FileName<-unknown.fucntion() print(FileName) and run it source("myscript.r") will return "myscript.r" Thanks Nevil Amos [[alternative HTML version deleted]]
2012 Jan 11
2
Vegan(ordistep) error: Error in if (aod[1, 5] <= Pin) { : missing value where TRUE/FALSE needed
I am getting the following erro rmessage in ordistep. I have a number of similarly structured datasets using ordistep in a loop, and the message only occurs for some of the datasets. I cannot include a reproducible sample - the specific datasets where this is occur ing are fairly large and there are several pcnm's in the rhs of the formula. thanks for any pointers that may allow me to
2010 Apr 29
5
reduce size of pdf
is there a way to reduce the size of pdf files in R: ? compression? lower dpi ? or some other option?
2010 Oct 12
2
repeatability/intraclass with nested levels
I have a spectrophotometric dataset with repeated measures of a value at 200 wavelengths for each of 150 individuals. I would like to use the repeated samples to at each wavelength to look at measurement/observer error, compared to difference between individuals error I have looked at doing this with icc{irr} or using an anova approach, but I am unclear how to acheive this given that there
2009 Feb 20
2
cluster analysis: mean values for each variable and cluster
Hi all! I'm new to R and don't know many about it. Because it is free, I managed to learn it a little bit. Here is my problem: I did a cluster analysis on 30 observations and 16 variables (monde, figaro, liberation, etc.). Here is the .txt data file:
2018 Jul 10
4
Construcción de archivo de texto
Hola a todos, A partir de los siguientes datos: d <- list(`1` = structure(list(ped = c(1L, 1L, 1L, 1L, 1L, 1L, 1L), id = 1:7, father = c(2L, 0L, 0L, 2L, 2L, 2L, 2L), mother = c(3L, 0L, 0L, 3L, 3L, 3L, 3L), sex = c(2L, 1L, 2L, 2L, 2L, 1L, 2L), affected = c(1L, 2L, 1L, 1L, 2L, 2L, 2L)), row.names = c("1", "2", "3", "4", "5",
2011 Dec 03
1
partial mantel tests in ecodist with intential NA values.
I would like to perform partial mantel tests on only within group values, with "between group" values assigned to NA. This is possible in package ncf partial.mantel.test, however this sues a different permutation to that used in ecodist.ecodist will not accept data with NA values, returning a "matrix is not square error. is it possible to perform this test in ecodist? many thanks
2010 Sep 21
1
partial dbRDA or CCA with two distance objects in Vegan.
I am trying to use the cca/rda/capscale functions in vegan to analyse genetic distance data ( provided as a dist object calculated using dist.genpop in package adegenet) with geographic distance partialled out ( provided as a distance object using dist function in veganthis method is attempting to follow the method used by Geffen et al 2004 as suggested by Legendre and . FORTIN (2010). I
2018 Dec 12
2
Subset dentro de un for
Gracias Marcelino. Si, (i in 1:length(GT)), lo he utilizado mil veces, pero se me sigue olvidando de una vez a otra. Lo iba a mirar, pero me centré primero en que me hiciera bien el mapa. He probado el for y me da este error: Error in aes(x = lon, y = lat, color = get(GT[i]), size = 2) + scale_colour_gradient(low = ("white"), : non-numeric argument to binary operator