Re: [R] print data.frame with a list column

2024-01-29 Thread Micha Silver
Excellent, many thanks. On 29/01/2024 16:56, Ivan Krylov wrote: On Mon, 29 Jan 2024 14:19:21 +0200 Micha Silver wrote: Is there some option to force printing the full list? df <- data.frame("name" = "A", "bands" = I(list(1:20))) format.AsIs is responsi

[R] print data.frame with a list column

2024-01-29 Thread Micha Silver
A 1, 2, 3, I'd like to avoid the ellipsis in "bands" column, rather print all list elements. Thanks -- Micha Silver Ben Gurion Univ. Sde Boker, Remote Sensing Lab cell: +972-523-665918 __ R-help@r-project.org mailing list -- To UNS

Re: [R] Calculating volume under polygons

2023-11-21 Thread Micha Silver
mask_r) # Bind the list output into a data frame and calculate the proportion cover for each category result <- bind_rows(x, .id = "Name") %>%   group_by(Name) %>% summarize(Area = sum(coverage_area)) %>%   group_by(Name) %>% mutate(Volume = Area * min(na.omi

Re: [R] Calculating volume under polygons

2023-11-20 Thread Micha Silver
39 642 56 36 16 53 39 ...  $ geometry  :sfc_POLYGON of length 12; first list element: List of 1   ..$ : num [1:18, 1:3] 55.6 55.6 55.6 55.6 55.6 ...   ..- attr(*, "class")= chr [1:3] "XYZ" "POLYGON" "sfg"  - attr(*, "sf_column")= chr "geomet

Re: [R] Calculating volume under polygons

2023-11-20 Thread Micha Silver
e of each polygon volumes <- sapply(values, function(x) rasterVolume(x, r)) What is this "rasterVolume" function that you call here? # Print the results for (i in 1:length(volumes)) { cat(sprintf("Volume under polygon %d: %f\n", i, volumes[i])) }

Re: [R] save(), load(), saveRDS(), and readRDS()

2023-10-06 Thread Micha Silver
_ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Micha Silver Ben Guri

Re: [R] interval between specific characters in a string...

2022-12-04 Thread Micha Silver
t version of stringr (currently being processed by CRAN) provides str_split_1() for exactly this purpose. Thanks! Well appreciated... Hadley -- Micha Silver Ben Gurion Univ. Sde Boker, Remote Sensing Lab cell: +972-523-665918 __ R-help@r-project.or

Re: [R] [External] Re: Selecting a minimum value of an attribute associated with point values neighboring a given point and assigning it as a new attribute

2022-11-07 Thread Micha Silver
caution when clicking links or opening attachments. When in doubt, email the TTS Service Desk at i...@tufts.edu<mailto:i...@tufts.edu> or call them directly at 617-627-3376. [[alternative HTML version deleted]] __ R-help@r-project.org ma

Re: [R] Opening shapefiles in R

2022-10-22 Thread Micha Silver
o read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Micha Silver Ben Gurion Univ. Sde Boker, Remote Sensing Lab cell: +972-523-665918 __ R-help@r-project.org maili

Re: [R] How long does it take to learn the R programming language?

2022-09-27 Thread Micha Silver
Can I nominate this for a fortune entry? :-) On 27/09/2022 18:44, Rui Barradas wrote: I don't know if this is true but it is said that once you are comfortable with help("lapply"), you've made it. -- Micha Silver Ben Gurion Univ. Sde Boker, Remote Sensing Lab cell: +

Re: [R] Problem installing R 4.2 on Ubuntu 20-04

2022-07-25 Thread Micha Silver
ski __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Micha Silver

Re: [R] Format dates issues with R

2021-12-14 Thread Micha Silver
%y") But you format as day, month, yr, not what you suggested. Try: format = "%m/%d/%Y" -- Micha Silver Ben Gurion Univ. Sde Boker, Remote Sensing Lab cell: +972-523-665918 __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and

Re: [R] Is 'temp' a reserved/key word in R?

2021-11-30 Thread Micha Silver
, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Micha Silver Ben Gurion Univ. Sde Boker, Remote Sensing Lab cell: +972-523-665918 _

Re: [R] Merge column with characters

2021-11-18 Thread Micha Silver
", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "&quo

Re: [R] What to do when problems() returns nothing

2021-11-04 Thread Micha Silver
paste(year, mon, day, sep="-")) time_string <- with(cor_stage, paste(hr, min, "00", sep=":")) cor_stage['date_time'] <- as.POSIXct(paste(date_string, time_string, cor_stage$tz)) Why are you importing the last "ft" column as an integer when

Re: [R] concatenating columns in data.frame

2021-07-03 Thread Micha Silver
. The trick is to convert the vector into symbols then use "!!!" to convert something like 'c("alpha", "beta", "gamma")' into something more like ' "alpha", "beta", "gamma" ' so that paste sees them as m

[R] concatenating columns in data.frame

2021-07-01 Thread Micha Silver
t = lapply(1:nrow(use_df), function(r) {     r_combo = paste(use_df[r,], collapse="_")     return(data.frame("Combo" = r_combo))     })     combo = do.call(rbind, combo_list)     names(combo) = "Combo"     return(combo) } combo_col = UpdateCombo(df, use_columns) df_c

Re: [R] Conversion of String to Datetime: How to Keep Timezone Offset when Printing?

2021-06-05 Thread Micha Silver
etime objects while keeping a visual indication of each timezone offset when the data is printed? Please excuse any awkward phrasing; being pretty new to R, I probably did not phrase anything correctly. Thank you very much in advance! Thomas __ R-help@r-project.org mailing list -- To UNSUBSCRI

Re: [R] how to view and edit this RData file

2020-07-22 Thread Micha Silver
n. I appreciate your help in advance [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.ht

Re: [R] Need help using GRASS within R - problem with CRS using the 'v.generalize' command

2020-06-08 Thread Micha Silver
tion you may need to help me in finding a solution to this problem. Yours sincerely, Loïc __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project

Re: [R] Ubuntu 18.04 R repo bionic-cran35 seems to be broken

2020-04-28 Thread Micha Silver
o/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Micha Silver Ben Gurion Univ. Sde Boker, Remote Sensing Lab cell: +972-523-665918 __ R-help@r-proj

Re: [R] partialPlot within a function [Solved]

2018-09-02 Thread Micha Silver
n", impvar[i]),         ylim=c(30, 70)) do.call("partialPlot", pP_params)     } Regards, On 09/01/2018 11:32 PM, Micha Silver wrote: I am running randomForest regressions in a loop, passing a different data.frame each time, and trying to plot importance and parti

Re: [R] partialPlot within a function

2018-09-01 Thread Micha Silver
— Sent from my Outlook for Android https://aka.ms/ghei36 ---- *From:* Micha Silver *Sent:* Sunday, September 2, 2018 11:54:44 AM *To:* Amit Mittal *Cc:* R-help *Subject:* Re: [R] partialPlot within a function On 09/02/2018

[R] partialPlot within a function

2018-09-01 Thread Micha Silver
graphics  grDevices utils datasets  methods base other attached packages: [1] randomForest_4.6-14 loaded via a namespace (and not attached): [1] compiler_3.5.1 tools_3.5.1 Thanks -- Micha Silver Ben Gurion Univ. Sde Boker, Remote Sensing Lab cell: +972-523-665918 ___

[R] Fwd: Re: scatter plot coloring problem

2018-07-21 Thread Micha Silver
are overplotted and only colour for last plotted level is visible. So I used geom_jitter() to get a reasonable looking visualization. Cheers Petr -- Micha Silver Ben Gurion Univ. Sde Boker, Remote Sensing Lab cell: +972-523-665918 __ R-help@r

Re: [R] scatter plot coloring problem

2018-07-20 Thread Micha Silver
On 07/20/2018 02:01 PM, Micha Silver wrote: On 07/20/2018 01:28 PM, Bert Gunter wrote: Nothing attached. The mail server strips most attachments for security. Here is a (slightly shorter) repex. The fourth plot shows the problem. The first three are as expected. library(ggplot2

Re: [R] scatter plot coloring problem

2018-07-20 Thread Micha Silver
quot;, "Bias only", "Bias only", "Bias only", "Bias only", "Bias only", "Lognormal error dist.", "Lognormal error dist.", "Lognormal error dist.", "Lognormal error dist.", "Lognormal error dist.", "

[R] scatter plot coloring problem

2018-07-20 Thread Micha Silver
ables show colors as expected, and when applying the same ggplot() functions to the second dataframe, colors are correctly applied for all variables. I'm scratching me head over this for some time. Maybe someone can see what I'm missing? My repex is attached Thanks -- Micha Silver Ben

Re: [R] How to produce rainfall maps

2017-11-25 Thread Micha Silver
le.asc and pointfile.csv should be? If no would somebody please show me another way providing a small example? Thank you for your help Stefano -- Micha Silver Ben Gurion Univ. Sde Boker, Remote Sensing Lab cell: +972-523-665918 __ R-help@r-pro

Re: [R] apply and cor()

2017-05-12 Thread Micha Silver
-help [mailto:r-help-boun...@r-project.org] On Behalf Of David L Carlson Sent: Friday, May 12, 2017 10:48 AM To: Ismail SEZEN ; Micha Silver Cc: R-help@r-project.org Subject: Re: [R] apply and cor() Actually, r is a vector, not an index value. You need apply(compare_data, 1, function(r) cor(r, t(test

[R] apply and cor()

2017-05-12 Thread Micha Silver
ata.frame one row at a time: > dim(compare_data['20',]) [1] 1 31 > dim(compare_data['1473',]) [1] 1 31 It looks as I expected. What am I missing?? Thanks -- Micha Silver cell: +972-523-665918 __ R-help@r-project.org maili

Re: [R] seq.POSIXt creates duplicate entries

2015-12-09 Thread Micha Silver
Hello David and David: Thanks for responding On 12/10/2015 01:33 AM, David Winsemius wrote: On Dec 9, 2015, at 10:58 AM, Micha Silver wrote: Hello all: I am creating a time series using seq.POSIXt. ts.full <- as.character(seq.POSIXt(as.POSIXct(start(d.zoo)), as.POSIXct(end(d.zoo)), by=&q

[R] seq.POSIXt creates duplicate entries

2015-12-09 Thread Micha Silver
ted(ts.full) I see that there are some duplicate hours. These fall right at the time change. How can I avoid this? (or remove the duplicates)? Thanks -- Micha Silver Arava Drainage Authority +972-523-665918 __ R-help@r-project.org mailing list -- T