similar to: as.list rcode

Displaying 20 results from an estimated 1000 matches similar to: "as.list rcode"

2010 Oct 27
1
Fwd: as.list
-------- Original-Nachricht -------- Datum: Wed, 27 Oct 2010 15:03:48 +0200 Von: "Sibylle St?ckli" <sibylle.stoeckli at gmx.ch> An: Rhelp <r-help at r-project.org> Betreff: as.list Dear R-users sorry, here Rcode included (attachment has been removed) I would like to read a txt file as list, to select rows and columns, and to create barplots. (1) selection of parameter
2024 Apr 18
2
Import multiple tif raster
Dear community Dear Ivan Thanks a lot. The code works now. Solution: direct and full path to the .tif files. I confused back and forward slash #first import all files in a single folder as a list rastlist <- list.files(path = "C:/Users/Sibylle St?ckli/Desktop/NCCS_Impacts_Lot2_2022/InVEST/Species_Input/valpar_bee_presence", pattern='.tif$', all.files= T, full.names= T) At
2024 Apr 18
1
Import multiple tif raster
Dear Ivan Thanks a lot. I tried now to provide the full path. However probably the "?" in the path produces the error, would that be possible? > #first import all files in a single folder as a list > rastlist <- list.files(path = "C:\Users\Sibylle St?ckli\Desktop\NCCS_Impacts_Lot2_2022\InVEST\Species_Input\valpar_bee_presence", pattern='.tif$', all.files=
2024 Feb 05
1
ggarrange & legend
I'm sorry but that is not a working example. A working example needs to create the plots being used. For example, stealing some code from https://rpkgs.datanovia.com/ggpubr/reference/ggarrange.html #================================================================= data <https://rdrr.io/r/utils/data.html>("ToothGrowth")df <- ToothGrowthdf$dose <- as.factor
2024 Aug 16
2
allequal diff
Many thanks Ivan Use is.na() on getValues() outputs, combine the two masks using the | operator to get a mask of values that are missing in either raster, then negate the mask to choose the non-missing values: all.equal(getValues(r1)[!mask], getValues(r2)[!mask]) --> what do you mean by use is.na() in getValues(). So I need to call getValues a second time? I suppose you mean to first
2024 Nov 06
1
Using multiple dat files
"It seems therefore that there is no other way than read in individually > 100 weather tables using read.tables., right? Using file.choose() doesn't change the work." Yes. With that many files, file.choose() does not make sense. However, I still do not understand what is the problem with using lapply() on the character vector of file names with read.table() as you did in your
2024 Feb 26
1
igraph_vertex
Dear Ivan Thanks a lot. I used: windowsFonts(Helvetica = windowsFont("Helvetica")) No warning now with Helvetica Additionally I used "sans", similarly no warning in the first part. But still not able to open tiff with both versions: Using "stress" as default layout > dev.off() TIFFOpen: figures/AES_network_bymembership.tiff: Cannot open. RStudioGD 2
2024 Aug 24
1
paired raster boxplots
Dear Ivan Dear community Quite nice book recommendation. Yes indeed my raster "s" (the shape file for the boxplot classes) has several layers. That's way I tried to select a layer by " s<-sf$Unterregio". > sf <- read_sf("C:/Users/....._BiogeoRegion.shp") > names(sf) > names(sf) [1] "RegionNumm" "RegionName"
2024 Feb 05
2
ggarrange & legend
Dear John Kane Dear R community Here my working example 1. Example that is working with legend=?top?. However, as mentioned, the legend is in the middle of the top axis. mylist<-list(p1, p2) dev.new(width=28, height=18) fig1<- ggarrange(plotlist=mylist, common.legend = TRUE, legend="top", labels = c("(A)", "(B)"), font.label = list(size = 18, color =
2024 Aug 16
1
allequal diff
Cool thanks # values and mask r1 r1 <- getValues(r1) mask1 <- is.na(r1) # Do the same for r2 r2 <- getValues(r2_resampled) mask2 <- is.na(r2) # Combine the masks all.equal(r1[!(mask1 & mask2)], r2[!(mask1 & mask2)]) output > all.equal(r1[!(mask1 & mask2)], r2[!(mask1 & mask2)]) [1] "'is.NA' value mismatch: 389 in current 56989152 in target"
2024 Aug 23
1
paired raster boxplots
Dear Ivan Many thanks. Using my own dataset, my "s" is a layer shape file. Somewhere I need to define : snew<-s$Unterregio I tried it to do it before stack(), but it seems to be the wrong way. Do you have any suggestion? Code: > #first import all files in a single folder as a list > rastlist_pres <- list.files(path ="C:/Users/....._bee_presence",
2024 Nov 07
0
Using multiple dat files
?s 18:59 de 06/11/2024, Sibylle St?ckli escreveu: > Dear Rui > Dear Bert > Many thanks > Solution > filelist <- list.files(path = "O:/Data-Work/2.../Daten_RA-MeteoCH_1990-2021", > pattern='*.dat', all.files= T, full.names= T) > AAR<-read.table(filelist[1]) > It seems therefore that there is no other way than read in individually > 100 > weather
2024 Aug 18
2
allequal diff
Dear Ivan Thanks a lot for this very nice example. Is it true that all.equal just compares y values? Based on this help here I think so and the value I got is the difference for the y-values. https://www.statology.org/all-equal-function-r/ However, here I see x and y testing? https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/all.equal I am actually interested in the x values
2024 Aug 18
2
allequal diff
"Is it true that all.equal just compares y values?" The following may be a bit more than you may have wanted, but I hope it is nevertheless useful. The first place you should go to for questions like this is the Help system, not here, i.e. ?all.equal When you do this, you will find that all.equal() is a so-called S3 generic function, which, among other things, means that it works
2024 Aug 18
1
allequal diff
?? The OP's original problem is that the all.equal method for raster objects (raster:::all.equal.raster), which is a wrapper around the compareRaster() function, compares a bunch of different properties of rasters (extent, resolution, values, etc.) and only returns a single overall logical (TRUE/FALSE) value. OP wanted to see the magnitude of the difference (as you could get for more
2024 Aug 18
1
allequal diff
Ah...I see. Perhaps, then, the maintainer should be contacted, as the desired functionality seems similar to that provided in other all.equal methods. I realize that this may often not elicit a (prompt) response. -- Bert On Sun, Aug 18, 2024 at 11:50?AM Ben Bolker <bbolker at gmail.com> wrote: > > The OP's original problem is that the all.equal method for raster >
2023 Nov 24
1
ggplot adjust two y-axis
Hi, Just find a scaling factor that would make the two sets of data comparable. Here I divided the second row by 5 and did the same for the second axis. Charles-?douard F1 <- as.table(matrix(c(50,11,6,17,16,3,1,2237,611,403,240,280,0,0), 2,7)) barplot(F1, beside = TRUE, col = c("blue", "grey")) axis(2, at=c(0,10,20,30,40,50,60, labels=c(0,10,20,30,40,50,60))) axis(4, at =
2024 Feb 05
1
ggarrange & legend
Could you supply us with a MWE (minimal working example)of what you have so far? Thanks. On Mon, 5 Feb 2024 at 05:00, SIBYLLE ST?CKLI via R-help < r-help at r-project.org> wrote: > Dear R community > > It is possible to adjust the legend in combined ggplots using ggarrange > with > be positions top, bottom, left and right. > My question: Is there a function to change the
2023 Nov 24
1
ggplot adjust two y-axis
Dear Charles-Edouard Thanks a lot. Yes indeed barplot sounds excellent. Unfortunately, the scale of the smaller axis is fixed, even If I am able to draw to axes. The idea is to expand the scale to the scale to the second axis for comparison. F1 <- as.table(matrix(c(50,11,6,17,16,3,1,2237,611,403,240,280,0,0), 2,7)) barplot(F1, beside = TRUE, col = c("blue", "grey"))
2023 Nov 24
1
ggplot adjust two y-axis
Hi, I don't know the axis mecanism well enough in ggplot but using the original barplot function you can add an axis on the right using the axis function. Here is an example: test <- as.table(matrix(c(2,10,3,11), 2,2)) barplot(test, beside = TRUE, col = scales::brewer_pal(palette = 1)(2)) axis(4, at = c(0, 5, 10), labels = c(0,50,100)) -----Message d'origine----- De?: