Re: [R] Why does a 2 GB RData file exceed my 16GB memory limit when reading it in?

2020-09-03 Thread Ista Zahn
On Wed, Sep 2, 2020 at 7:22 PM Leandro Marino wrote: > > David, > > If the ".Rdata" contains more than one object you could (and maybe should > use) the SOAR package (from Venables). This package helps you to split the > objects over multiple RData files. It's useful when you have numerous >

Re: [R] read.csv fails in R console in Ubuntu terminal but works in RStudio after R 3.6.3 upgrade to R 4.0.2?

2020-07-16 Thread Ista Zahn
On Thu, Jul 16, 2020 at 5:15 PM Ista Zahn wrote: > > On Thu, Jul 16, 2020 at 8:18 AM Rui Barradas wrote: > > > > Hello, > > > > Thanks, but no, download.file still gives 403 Forbidden with both method > > = "libcurl" and method = "wget&q

Re: [R] read.csv fails in R console in Ubuntu terminal but works in RStudio after R 3.6.3 upgrade to R 4.0.2?

2020-07-16 Thread Ista Zahn
On Thu, Jul 16, 2020 at 8:18 AM Rui Barradas wrote: > > Hello, > > Thanks, but no, download.file still gives 403 Forbidden with both method > = "libcurl" and method = "wget". I think that makes it "not an R question". Ask on https://unix.stackexchange.com/ maybe? Best, Ista > > Rui Barradas >

Re: [R] Inquiry for R software Licensing.

2020-07-11 Thread Ista Zahn
On Sat, Jul 11, 2020 at 6:20 PM Stephen Ellison wrote: > > > Patrick (Malone Quantitative) > > There's only one version and it's free. > > You're forgetting Microsoft R, formerly Revolution R > (https://mran.revolutionanalytics.com/download), which comes in open and > enterprise flavours, both

Re: [R] read_excel() ignore case of worksheet name?

2020-05-26 Thread Ista Zahn
How about read_excel_table <- function(x) { readxl::read_excel( x, sheet=grep("tables", excel_sheets(x), ignore.case = TRUE, value = TRUE), .name_repair = fixColNames ) } lapply(SIS$FULL_FILEPATH, read_excel_table) --Ista On Tue,

Re: [R] Help with Parallel Processing

2020-05-21 Thread Ista Zahn
Hi Ravi, Please read the ?future documentation, the answers to all your questions are explained there. Best, Ista On Thu, May 21, 2020 at 3:20 PM Ravi Jeyaraman wrote: > > Dear Friends, > > > > I'm trying to run a bunch of tasks in parallel using 'Future' package and > for some reason, it's

Re: [R] Attribute Combinations

2020-05-21 Thread Ista Zahn
Another one just for fun: prop.table(table(interaction(x))) or possibly prop.table(table(droplevels(interaction(x Best, Ista On Thu, May 21, 2020 at 1:22 PM Jeff Reichman wrote: > > R-help forum > > > > Looking for a function or some guidance for obtaining the percentage of > attribute

Re: [R] PCRE configure problem with R-4.0.0

2020-05-05 Thread Ista Zahn
> |> > Linux Mint 17.2 is based on Ubuntu 14.04, which has been released in > |> > April 2014, while PCRE2 has been released in 2015. > |> > |> Moreover, support for 17.2 ended over a year ago (according to > |> https://en.wikipedia.org/wiki/Linux_Mint_version_history). I suggest > |> upgrading

Re: [R] PCRE configure problem with R-4.0.0

2020-05-04 Thread Ista Zahn
On Mon, May 4, 2020 at 3:51 AM Ivan Krylov wrote: > > First of all, you mentioned Linux Mint, so you might get better advice > on R-SIG-Debian mailing list. > > On Mon, 4 May 2020 16:15:42 +1200 > Patrick Connolly wrote: > > >There are quite a lot of packages in the repository for Linux Mint >

Re: [R] repository for ubuntu/linux mint for R 4.0.0

2020-04-30 Thread Ista Zahn
On Wed, Apr 29, 2020 at 8:33 PM Rasmus Liland wrote: > > On 2020-04-29 19:55 -0400, ProfJCNash wrote: > > In updating (an older computer with) Linux Mint 18.3 I tried to add > > the repository > > > > deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran40/ > > > > as per the "Download R

Re: [R] Interactive stats packages

2020-04-16 Thread Ista Zahn
mdr/ http://www.deducer.org/pmwiki/pmwiki.php?n=Main.DeducerManual There are undoubtedly others. --Ista > > Thanks > > Bernard > Sent from my iPhone so please excuse the spelling!" > > > On Apr 16, 2020, at 5:44 PM, Ista Zahn wrote: > > > > On Thu,

Re: [R] Interactive stats packages

2020-04-16 Thread Ista Zahn
On Thu, Apr 16, 2020 at 4:48 PM Bernard Comcast wrote: > > Do any of you know of any interactive stats analysis packages built on top of > R? R _is_ an interactive stats package, please be more specific :-) Maybe you mean something like https://dreamrs.github.io/esquisse/index.html Best, Ista

Re: [ESS] TWITTER API environment variables

2020-04-09 Thread Ista Zahn via ESS-help
Hi Patrick, Are you sure you've diagnosed the issue correctly? From what I can see the name of the environment variable is always TWITTER_PAT, at least in the current rtweet release (0.7.0). get_tokens calls twitter_pat (https://github.com/ropensci/rtweet/blob/v0.7.0/R/tokens.R#L120) and

Re: [R] Tidyverse Question

2020-03-23 Thread Ista Zahn
Hi Phillip, On Mon, Mar 23, 2020 at 6:33 PM Phillip Heinrich wrote: > > Can someone out there run the following code from the book Analyzing Baseball > Data with R – Chapter 7 page 164? > > library(tidyverse) > db <- src_sqlite(“data/pitchrx.sqlite”,create=TRUE) > > Over the past two

Re: [R] 2D and 3D graphing

2020-03-23 Thread Ista Zahn
It depends on what you are trying to do, but ggplot-to-rayshader looks pretty slick. --Ista On Mon, Mar 23, 2020 at 7:52 AM Ek Esawi wrote: > > Hi All-- > > I have been looking into 2D and 3D graphing packages. Based on what i > read, it seems that ggplot2 is the best and I like it too, but

Re: [R] separate and gather functions

2019-08-13 Thread Ista Zahn
How about > library(tidyr) > separate_rows(d, Col2) Col1 Col2 1 Agency A Function1 2 Agency A Function2 3 Agency A Function3 4 Agency A Function4 5 Agency B Function2 6 Agency B Function4 7 Agency C Function1 8 Agency C Function3 9 Agency C Function4 On Mon, Aug 12, 2019 at 11:06 PM

Re: [R] Reading recurring data in a text file

2019-07-26 Thread Ista Zahn
Here is another possibility library(stringr) readterm <- function(term, text) { lapply(str_split(text, fixed(term))[[1]][-1], fread, skip = 4, nrows = 5 ) } easymethod <- function(whalines) { whalines <- str_c(whalines, collapse = "\n") lapply(c(srchStr1,

Re: [R] R installation Ubuntu 18.04 missing dependency libreadline6

2019-03-03 Thread Ista Zahn
I can see. I was a > bit amazed. > > I think I have a faulty Ubuntu installation and will have to reinstall. What > fun > > > > On Sunday, March 3, 2019, 1:16:52 p.m. EST, Ista Zahn > wrote: > > > Hi John, > > The official instructions at > https://cran.r-proj

Re: [R] R installation Ubuntu 18.04 missing dependency libreadline6

2019-03-03 Thread Ista Zahn
Hi John, The official instructions at https://cran.r-project.org/bin/linux/ubuntu/ work on a fresh ubuntu:bionic from dockerhub. This suggests that the issue is due to the configuration of your local system rather than with any problem with either R or ubuntu. My guess is that you've been reading

Re: [R] Package updates fail: how to fix the causes

2019-02-15 Thread Ista Zahn
Hi Rich, Install udunits. If you don't know how to do that in slackware go ask on a slackware forum. Best, Ista On Fri, Feb 15, 2019 at 10:58 AM Rich Shepard wrote: > > Running R-3.5.2 on Slackware-14.2, using my script that updates installed > packages found four that failed. My web searches

Re: [R] POSIXlt class and lapply

2019-02-15 Thread Ista Zahn
As a practical matter, you can't treat POSIXlt as a list. The documentation could be clearer about this. ?DateTimeClasses says "Class ‘"POSIXlt"’ is a named list of vectors", and then later, "Note that the internal list structure is somewhat hidden, as many methods (including ‘length(x)’,

Re: [R] read_xl question

2019-01-23 Thread Ista Zahn
Something like files <- list.files(pattern="*.xls", full.names = TRUE) data <- lapply(files, read_excel, sheet="Flow Data", range=("b9:c10")) should do it. --Ista On Wed, Jan 23, 2019 at 12:42 PM Thomas Subia via R-help wrote: > > > Colleagues, > > I have a workbook which has 3 worksheets >

Re: [R] How to perform Mixed Design ANOVA on MICE imputed dataset in R?

2019-01-04 Thread Ista Zahn
Hi Lisa, The package web page at http://stefvanbuuren.github.io/mice/ has all the info you need to get started. Best, Ista On Fri, Jan 4, 2019 at 3:29 AM Lisa Snel wrote: > > Hi all, > > I have a question about performing a Mixed Design ANOVA in R after multiple > imputation using MICE. My

Re: [R] Accessing Data Frame

2019-01-03 Thread Ista Zahn
Hi Benoit, You can select rows from deck matched in aCard using merge(deck, aCard) Selecting rows that don't match is bit more difficult. You could do something like isin <- apply(mapply(function(x, y) x %in% y, deck, topCard), 1, all) deck[!isin, ] perhaps.

Re: [R] Corrupting files while copying (was Re: saveRDS() and readRDS() Why? [solved, pretty much anyway])

2018-11-15 Thread Ista Zahn
Hi Patrick, I think it would help to start from the beginning and give complete (but concise!) replication instructions, including telling us what host and gest operating systems you are using (including the versions), the version of virtualbox you used, and exactly what steps are needed to

Re: [R] Read

2018-11-10 Thread Ista Zahn
readr::read_csv produces the desired result by default: readr::read_csv("x1,x2,x3,x4,x5 12,13,,14,, 22,23,24,25,26 ,33,34,34,") Best, Ista On Fri, Nov 9, 2018 at 8:40 PM Val wrote: > > HI all, > I am trying to read a csv file, but have a problem in the row names. > After reading, the name of

Re: [R] source() fails in same directory as script: cannot find file

2018-10-27 Thread Ista Zahn
but I assure you I solved the mystery without recourse to any information beyond what was publicly posted on the r-help mailing list. --Ista > > On October 27, 2018 1:38:40 PM PDT, Duncan Murdoch > wrote: > >On 27/10/2018 9:35 AM, Ista Zahn wrote: > >> On Fri, Oct

Re: [R] source() fails in same directory as script: cannot find file

2018-10-27 Thread Ista Zahn
ments/white-papers/geochemistry/willamette-river-mercury/scripts") > >> source("input-summerize2.R") > > > >works > > > >Hope it helps, > > > >Jeremie > > > > > >Rich Shepard writes: > > > >> On Fri, 26 Oc

Re: [R] source() fails in same directory as script: cannot find file

2018-10-26 Thread Ista Zahn
On Fri, Oct 26, 2018 at 2:16 PM Rich Shepard wrote: > > On Fri, 26 Oct 2018, Ista Zahn wrote: > > > I'm confused. It seems the error is that the file can't be found; if > > so, what does it matter what is in the file? > > Ista, > >Beats me. > &g

Re: [R] source() fails in same directory as script: cannot find file

2018-10-26 Thread Ista Zahn
Hi Rich, I'm confused. It seems the error is that the file can't be found; if so, what does it matter what is in the file? As far as I can see you are either not in the directory you think you are, or b) the file is not named what you think it is. Best, Ista On Fri, Oct 26, 2018 at 12:30 PM

Re: [R] Matching multiple search criteria (Unlisting a nested dataset, take 2)

2018-10-19 Thread Ista Zahn
Here is another approach, just for fun: library(tidyverse) library(tokenizers) anyall <- function(x, # a character vector terms # a list of character vectors ){ any(map_lgl(terms, function(term) { all(term %in% x) })) } mutate(th,

Re: [R] Unlisting a nested dataset

2018-10-16 Thread Ista Zahn
Hi Nate, You've made it pretty difficult to answer your question. Please see https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example and follow some of the suggestions you find there to make it easier on those who want to help you. Best, Ista On Mon, Oct 15, 2018

Re: [R] RMarkdown vignettes v. Jupyter notebooks?

2018-10-11 Thread Ista Zahn
state of ignorance. Much appreciated. --Ista > > But I think you are correct that R Markdown and Jupyter have different > emphasis. > > Regards, > Yihui > -- > https://yihui.name > > On Thu, Oct 11, 2018 at 9:14 AM Ista Zahn wrote: > > > > On Thu, Oct 11, 20

Re: [R] RMarkdown vignettes v. Jupyter notebooks?

2018-10-11 Thread Ista Zahn
On Thu, Oct 11, 2018 at 10:15 AM Yihui Xie wrote: > > I just have one comment on the multi-language support in R Markdown > (inline below): > > On Thu, Oct 11, 2018 at 6:19 AM Ista Zahn wrote: > > > > Hi Spencer, > > > > On Thu, Oct 11, 20

Re: [R] RMarkdown vignettes v. Jupyter notebooks?

2018-10-11 Thread Ista Zahn
pyter notebook, so > the idea that they should be the gold standard for sharing results seems > absurd to me. > > [1] https://yihui.name/en/2018/09/notebook-war/ > > On October 11, 2018 5:53:29 AM PDT, Ista Zahn wrote: > >On Thu, Oct 11, 2018 at 8:36 AM Duncan Murdoch

Re: [R] RMarkdown vignettes v. Jupyter notebooks?

2018-10-11 Thread Ista Zahn
On Thu, Oct 11, 2018 at 8:36 AM Duncan Murdoch wrote: > > On 11/10/2018 7:18 AM, Ista Zahn wrote: > > Hi Spencer, > > > > On Thu, Oct 11, 2018 at 5:08 AM Spencer Graves > > wrote: > >> > >> Hello: > >> > >> > >&g

Re: [R] RMarkdown vignettes v. Jupyter notebooks?

2018-10-11 Thread Ista Zahn
Hi Spencer, On Thu, Oct 11, 2018 at 5:08 AM Spencer Graves wrote: > > Hello: > > >What are the differences between Jupyter notebooks and RMarkdown > vignettes? Here are some of the main differences I'm aware of: Rmarkdown files include code and prose. The results produced by the code

Re: [R] Genuine relative paths with R

2018-10-07 Thread Ista Zahn
my second form. Is this the benefit you are hoping for, or is there some other reason you want this feature? Note that when calling from R you can already to source("/path/to/dir/file.R", chdir = TRUE) Best, Ista > > Best regards, > > Olivier > > _

Re: [R] Genuine relative paths with R

2018-10-06 Thread Ista Zahn
On Sat, Oct 6, 2018 at 12:40 PM Ista Zahn wrote: > > Hi Olivier, > > Sorry for misspelling your name! Please see inline below. > > On Sat, Oct 6, 2018 at 9:58 AM Olivier GIVAUDAN > wrote: > > > > Hi Ista, > > > > Thank you for your reply. > > &

Re: [R] Genuine relative paths with R

2018-10-06 Thread Ista Zahn
ill don't get it. What is it that you actually want to do that you currently cannot? Best, Ista > > BTW I don't use R with command line, only within RStudio or with the default > GUI. > > Best regards, > > Olivier (and not Oliver ) > > De

Re: [R] Genuine relative paths with R

2018-10-06 Thread Ista Zahn
Hi Oliver, Interesting question. Can you describe your motivation in a little more detail? That is, why do you what this feature? I ask because to my way of thinking you have to know the path to the script in order to call it in the first place. If calling from R, is setwd("/path/to/dir")

Re: [R] For Loop

2018-09-23 Thread Ista Zahn
you are talking about. > > I just provided tentative solution for the person asking for it and > believe he has enough wisdom to decide what's best. why bother to > judge others subjectively? You are giving bad and confused advice. Please stop doing that. --Ista > On Sun, Sep

Re: [R] For Loop

2018-09-23 Thread Ista Zahn
ative ## 2 iterate.parallel() 7.5172.482 ## 1 regular() 3.0281.000 Honestly, just use log(c1[-1]/c1[-len]). The code is simple and easy to understand and it runs pretty fast. There is usually no reason to make it more complicated. --Ista > On Sun, Sep 23, 2018 at 12:33 PM

Re: [R] For Loop

2018-09-23 Thread Ista Zahn
Vectorize(function(i) log(c1[i + 1] / c1[i])) (1:len)) user system elapsed 1.258 0.022 1.282 Best, Ista > > On Sun, Sep 23, 2018 at 7:54 AM Ista Zahn wrote: >> >> On Sat, Sep 22, 2018 at 9:06 PM Wensui Liu wrote: >> > >> > or this one: >> >

Re: [R] For Loop

2018-09-23 Thread Ista Zahn
On Sat, Sep 22, 2018 at 9:06 PM Wensui Liu wrote: > > or this one: > > (Vectorize(function(i) log(c1[i + 1] / c1[i])) (1:len)) Oh dear god no. > > On Sat, Sep 22, 2018 at 4:16 PM rsherry8 wrote: > > > > > > It is my impression that good R programmers make very little use of the > > for

Re: [R] Does R version 3.4.4 work on Ubuntu 18.04.1

2018-09-18 Thread Ista Zahn
This is really the wrong place for this discussion. Please post ubuntu specific questions to r-sig-debian. Best, Ista On Tue, Sep 18, 2018 at 6:52 AM Ashim Kapoor wrote: > > Dear Rui, > > I tried R 3.4.4 on Ubuntu 18.04.1. It runs FINE except for an inhouse > package created by us. That is why I

Re: [R] Obtaining exact pattern in list.files()

2018-09-12 Thread Ista Zahn
pattern = "^File$" Best, Ista On Wed, Sep 12, 2018 at 7:53 AM Christofer Bogaso wrote: > > Hi, > > In the list.files() function, there is an argument 'pattern' to locate the > desired files. However I failed to see if I can manage to fetch those files > that having an exact match. > > For

Re: [R] Marginal effects with plm

2018-09-06 Thread Ista Zahn
You might be interested in the "prediction" and "margins" packages. --Ista On Wed, Sep 5, 2018 at 6:30 PM Miluji Sb wrote: > > Dear all, > > I am running the following panel regression; > > plm1 <- plm(formula = log(y) ~ x1 + I(x1^2) + heat*debt_dummy + tt, data = > df,

Re: [R] R shared library (/usr/lib64/R/lib/libR.so) not found.

2018-08-24 Thread Ista Zahn
On Thu, Aug 23, 2018 at 6:57 AM Rolf Turner wrote: > > > I *think* that this is an R question (and *not* an RStudio question!) I think this is actually and Ubuntu question, and probably belongs on R-sig-debian. > > I have, somewhat against my better judgement, decided to experiment with > using

Re: [R] learning tidyverse

2018-08-19 Thread Ista Zahn
https://www.tidyverse.org/learn/ On Sun, Aug 19, 2018 at 4:29 PM Erin Hodgess wrote: > > Hello everyone! > > Could anyone recommend a good way to learn about tidyverse, please? Is > there a book, please? > > Thanks, > Erin > > > > Erin Hodgess, PhD > mailto: erinm.hodg...@gmail.com > >

Re: [R] Fast matrix multiplication

2018-08-14 Thread Ista Zahn
On Tue, Aug 14, 2018 at 9:41 AM Ravi Varadhan wrote: > > Does Microsoft open R come with pre-compiled BLAS that is optimized for > matrix computations? Yes, see https://mran.microsoft.com/rro#intelmkl1 for details. --Ista > > Thanks, > Ravi > > -Original Messag

Re: [R] Fast matrix multiplication

2018-08-13 Thread Ista Zahn
nfo at https://mran.microsoft.com/rro#intelmkl1 --Ista > Thanks, > Ravi > > -Original Message- > From: Ista Zahn > Sent: Friday, August 10, 2018 12:20 PM > To: Ravi Varadhan > Cc: r-help@r-project.org > Subject: Re: [R] Fast matrix multiplication > > > Hi Ravi, &

Re: [R] Fast matrix multiplication

2018-08-10 Thread Ista Zahn
Hi Ravi, You can achieve substantial speed up by using a faster BLAS (e.g., OpenBLAS or MKL), especially on systems with multiple CPUs. On my (6 year old, but 8 core) system your example takes 3.9 seconds with using the reference BLAS and only 0.9 seconds using OpenBLAS. Best, Ista On Fri, Aug

Re: [R] grep

2018-07-16 Thread Ista Zahn
grep("(^| )ABHD14A( ;|$)",xgen, value = TRUE) maybe. On Mon, Jul 16, 2018 at 1:46 PM, Brian Smith wrote: > Hi, > > I was trying to find a pattern ("ABHD14A") in a character string ('xgen' in > example below) using grepl. Note that the individual members may be > separated by a semi-colon. > >

Re: [R] Regexp bug or misunderstanding

2018-07-02 Thread Ista Zahn
I think you want "[[:digit:]]" instead of "[:digit:]" --Ista On Mon, Jul 2, 2018 at 8:52 AM, Martin Møller Skarbiniks Pedersen wrote: > Hi, > >Have I found a bug in R? Or misunderstood something about grep() ? > >Case 1 gives the expected output >Case 2 does not gives the expected

Re: [R] Unable to take correct Web-snapshot

2018-06-01 Thread Ista Zahn
The documentation is at https://developers.coinbase.com/api/v2. You can make GET requests in R using the httr packge. --Ista On Fri, Jun 1, 2018 at 11:12 AM, Christofer Bogaso wrote: > Thanks for that information. > > However how can I use R to directly get data from that API? > > On Fri, Jun

Re: [R] Evaluation failure of IAPWS95 functions in a rowwise manner (tidyverse style)

2018-05-30 Thread Ista Zahn
Hi Shawn, I don't think it has anything to do with the tidyverse. If you keep simplifying your example you'll get all the way down to > DTp(T=c(279,294),p=c(0.46,0.46)) [1] 1000.12283 --Ista On Wed, May 30, 2018 at 2:14 PM, Shawn Way wrote: > I'm trying to use the IAPWS95 package with the

Re: [R] Trouble building R 3.5.0 under Ubuntu 18.04

2018-05-23 Thread Ista Zahn
.tar.gz cd R-3.5.0 ./configure --enable-R-shlib make also works fine here. FWIW, I'm starting with the ubuntu:latest docker image and going from there. Best, Ista > > Steve, can you build from source without the --enable-R-shlib flag on > configure? > > Kevin > > > On

Re: [R] Trouble building R 3.5.0 under Ubuntu 18.04

2018-05-23 Thread Ista Zahn
On Tue, May 22, 2018 at 6:47 PM, Steve Gutreuter wrote: > I would love to hear from anyone who has successfully built 3.5.0 under > Ubuntu 18.04 (Bionic Beaver). This is the wrong list, see R-sig-debian. That said, apt-get update apt-get build-dep r-base wget

Re: [R] Dataverse

2018-05-13 Thread Ista Zahn
Use https://cran.rstudio.com/web/packages/dataverse/ --Ista On Sun, May 13, 2018 at 5:21 AM, Ilio Fornasero wrote: > Hello. > > I am trying to find a way to retrieve data from Harvard Dataverse website. > I usually don't have problem in web-scraping data but the

Re: [R] Package parallel missing from CRAN_package_db

2018-05-09 Thread Ista Zahn
Hi Luís, The parallel package is built-in, and so is not distributed via cran. You'll see the same thing for all the built in packages, e.g., > pdb[pdb$Package=="stats",]["Package"] [1] Package <0 rows> (or 0-length row.names) > pdb[pdb$Package=="splines",]["Package"] [1] Package <0 rows> (or

Re: [R] [Rd] source(echo = TRUE) with a iso-8859-1 encoded file gives an error

2018-05-04 Thread Ista Zahn
On Fri, May 4, 2018 at 4:47 PM, Scott Kostyshak wrote: > I have very little knowledge about file encodings and would like to > learn more. > > I've read the following pages to learn more: > > http://stat.ethz.ch/R-manual/R-devel/library/base/html/Encoding.html > >

Re: [ESS] ess-dump-object-into-edit-buffer

2018-04-24 Thread Ista Zahn
On Tue, Apr 24, 2018 at 4:13 AM, Patrick Connolly <p_conno...@slingshot.co.nz> wrote: > On Mon, 16-Apr-2018 at 09:02AM -0400, Ista Zahn wrote: > > [...] > > |> This suggests to me that you did _not_ start with emacs -q, so indeed > |> you should start looking at y

Re: [R] How to dynamically add variables to a dataframe

2018-04-23 Thread Ista Zahn
Another option is d0[paste0("V", 1:nrow(d1))] <- 0 --Ista On Sun, Apr 22, 2018 at 4:23 AM, Eric Berger wrote: > Hi Luca, > How about this? > > # create some dummy data since I don't have your d0 or d1 >> n <- 3 >> d0 <- data.frame(a=runif(5),b=runif(5)) > > # here's the

Re: [ESS] ess-dump-object-into-edit-buffer

2018-04-16 Thread Ista Zahn
he problem is. Did you try commenting out the 'ess-source-directory' setting to see if that is the problem? Best, Ista > > Ideas as to where I should look are welcome. > > best > Patrick > > On Thu, 12-Apr-2018 at 11:08PM -0400, Ista Zahn wrote: > > |> Hi Patri

Re: [ESS] ess-dump-object-into-edit-buffer

2018-04-12 Thread Ista Zahn
w to do it), > > It would appear, if it doesn't reproduce, that the problem is > somewhere in my .emacs file. That's a hodge-podge of various things > I've picked up over the decades so it wouldn't be surprising to find > some incompatibilities. > > Ideas appreciated. > &g

Re: [ESS] ess-dump-object-into-edit-buffer

2018-04-11 Thread Ista Zahn
I can't reproduce it with the latest ESS from melpa. Can you give reproduction steps starting with emacs -q ? --Ista On Wed, Apr 11, 2018 at 4:58 AM, Patrick Connolly wrote: > For a long time I used to be able to use > > ess-dump-object-into-edit-buffer > > to

Re: [R] R and Java 10 ➜ rJava not able to build

2018-03-28 Thread Ista Zahn
On Wed, Mar 28, 2018 at 3:56 AM, Luis Puerto wrote: > Hi Jeff!! > > I really don’t know if running R CMD javareconf with sudo has posed a problem > here, now or in the past. What I know is sometimes it’s the only way to > really config it, if I don’t run with sudo, in

Re: [R] R and Java 10 ➜ rJava not able to build

2018-03-28 Thread Ista Zahn
On Tue, Mar 27, 2018 at 9:39 PM, Jeff Newmiller wrote: > I am not a Mac user, but I do use Linux and I would recommend not running R > with sudo unless you are an admin ninja. That defensive practice would render > the answer to your question moot. I don't think this

Re: [ESS] Indenting with magrittr and %>%

2018-03-22 Thread Ista Zahn
Hi Bill, It will be helpful to give some R code and show how you want it indented ... Best, Ista On Thu, Mar 22, 2018 at 2:44 PM, William Denton wrote: > I'm a big fan of %>% from magrittr and the tidyverse, but I can't get > indenting working with it. I have a long chain of

Re: [R] exporting data to stata

2018-03-22 Thread Ista Zahn
On Thu, Mar 22, 2018 at 4:52 AM, Raja, Dr. Edwin Amalraj wrote: > Hi , > > library(foreign) > write.dta(data1, "data1.dta") > > should work. I don't think so: > library(foreign) > example(svydesign) > write.dta(dstrat, "~/Downloads/foo.dta") Error in write.dta(dstrat,

Re: [R] alternative for multiple if_else statements

2018-02-22 Thread Ista Zahn
I don't fully understand the logic you are trying to implement, but something along the lines of foo <- cut(trialData$date, breaks = as.Date(c("2007-01-01", "2008-05-01", "2009-04-01",

Re: [R] Take the maximum of every 12 columns

2018-02-20 Thread Ista Zahn
://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail> >> Mail >> priva di virus. www.avast.com >> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail> >> <#m_4297398466082743447_m_6071581590498622123_DAB

Re: [R] Take the maximum of every 12 columns

2018-02-20 Thread Ista Zahn
Hi Milu, byapply(df, 12, function(x) apply(x, 1, max)) You might also be interested in the matrixStats package. Best, Ista On Tue, Feb 20, 2018 at 9:55 AM, Miluji Sb wrote: > Dear all, > > I have monthly data in wide format, I am only providing data (at the bottom > of

Re: [R] Include pre-existing PDF files as vignettes in an R package?

2018-02-18 Thread Ista Zahn
Hi Mike, Did you read the relevant section of the official "Writing R Extensions" manual? If so, what about the instructions provided there do you find lacking? Best, Ista On Sun, Feb 18, 2018 at 9:06 PM, Michael Hannon wrote: > Greetings. The group that I work

Re: [ESS] polymode indents everything when editing Rmd file?

2018-02-06 Thread Ista Zahn
Hi Paul, Why do you expect polymode to provide an indention benefit? "All" it does in the .Rmd case is give you a buffer with markdown-mode parts and R-mode parts. Indentation in the R-mode parts is handled by ESS, and indentation in markdown-mode parts is handled by markdown-mode. Or are you

Re: [ESS] ESS not returning to R process after R> help.start() ?

2018-02-06 Thread Ista Zahn
Hi Christain, Did you see https://github.com/emacs-ess/ESS/issues/300 ? Please take a look and ask back here if you don't find a satisfactory answer there. Best, Ista On Tue, Feb 6, 2018 at 8:13 AM, Christian wrote: > Hi, > I am working with Aquamacs, ESS end R; I am

Re: [R] variable names in lm formula ~.

2018-01-31 Thread Ista Zahn
I poked at this a little bit and found that the issue exists in stats:::C_termsform (which is called by terms.formula). Here is a variation on the demonstrations provided by Vito and Bert earlier: d<-data.frame(y=rnorm(10,5,.5), age=rnorm(10), exp=rnorm(10),

Re: [R] Portable R in zip file for Windows

2018-01-25 Thread Ista Zahn
On Jan 25, 2018 3:05 PM, "Juan Manuel Truppia" wrote: What is wrong with you guys? I asked for a zip, like R Studio has for example. Totally clear. The responsew you recieved suggest that your question was not as clear as you expected. You then treated a person trying to

Re: [R] Portable R in zip file for Windows

2018-01-25 Thread Ista Zahn
On Jan 25, 2018 6:38 AM, "Juan Manuel Truppia" wrote: Im already aware of that. Needs the portable apps framework to work. Thanks for the cheap hit by the way Thanks for wasting everyones time by failing to mention the things you already looked at and why they were

Re: [R] Errors in reading in txt files

2017-12-14 Thread Ista Zahn
On Thu, Dec 14, 2017 at 1:58 PM, Berend Hasselman wrote: > >> On 14 Dec 2017, at 19:36, lily li wrote: >> >> Hi R users, >> >> I have a question about reading from text files. The file has the structure >> below: >> >> TimeColumn1

Re: [R] Best R GUIs

2017-12-13 Thread Ista Zahn
On Dec 13, 2017 6:05 AM, "Juan Telleria" wrote: Dear R Community Members, I would like to add to one article I have written the best Graphical User Interfaces the R programming language has. For the moment I know: A) Rstudio. B) R Tools for Visual Studio. C) Open

Re: [R] Remove

2017-12-06 Thread Ista Zahn
Hi Ashta, There are many ways to do it. Here is one: vars <- sapply(split(DM$x, DM$GR), var) DM[DM$GR %in% names(vars[vars > 0]), ] Best Ista On Wed, Dec 6, 2017 at 6:58 PM, Ashta wrote: > Thank you Jeff, > > subset( DM, "B" != x ), this works if I know the group only. >

Re: [R] installing "rgl" package

2017-11-24 Thread Ista Zahn
On Nov 23, 2017 6:16 PM, "Duncan Murdoch" wrote: On 23/11/2017 6:05 PM, Santosh wrote: > Hi Rxperts, > I am trying to install 'rgl' package in Ubuntu.. Would highly appreciate > your assistance .. I tried several leads available on various discussion > fora and nothing

Re: [R] lapply and runif issue?

2017-11-14 Thread Ista Zahn
Hi Bert, On Tue, Nov 14, 2017 at 8:11 PM, Bert Gunter wrote: > Could someone please explain the following? I did check bug reports, but > did not recognize the issue there. I am reluctant to call it a bug, as it > is much more likely my misunderstanding. Ergo my request

Re: [R] Sharing an R installation via NFS on ubuntu cluster

2017-11-09 Thread Ista Zahn
I have to export every location where apt-get installs a component or can I force apt-get to place the installation in a certain location? Sounds like a question for an ubuntu forum, or r-sig-debian perhaps. On 8 November 2017 at 17:37, Ista Zahn <istaz...@gmail.com> wrote: > On We

Re: [R] Sharing an R installation via NFS on ubuntu cluster

2017-11-08 Thread Ista Zahn
On Wed, Nov 8, 2017 at 6:14 AM, Florian Oswald wrote: > hi all, > > i want to share an R installation from a master node to several compute > nodes via NFS. all nodes run ubuntu 16.04. I tried building R from source > but hit a wall several times because of missing

Re: [R] Problem with r project in ubuntu xenial

2017-11-08 Thread Ista Zahn
On Tue, Nov 7, 2017 at 6:46 PM, George Balas wrote: > For anyone who sees this conversation. > > There is a bug in installation of igraph in R language in Ubuntu. There is > a solution in stackoverflow. A link would be nice. We have to use the devtools. Write this code: >

Re: [R] Problem Subsetting Rows that Have NA's

2017-10-25 Thread Ista Zahn
On Tue, Oct 24, 2017 at 3:05 PM, BooBoo wrote: > This has every appearance of being a bug. If it is not a bug, can someone > tell me what I am asking for when I ask for "x[x[,2]==0,]". Thanks. You are asking for elements of x where the second column is equal to zero.

Re: [ESS] (Aquamacs) Why is text at R prompt read-only, cannot delete? 2

2017-10-09 Thread Ista Zahn
Hi Christian, 1. The subject line appears to be unrelated to the body of your message. 2. Aquamacs configures ESS for you, so why are you trying to load it yourself? 3. Your message itself is very hard to understand. Consider spending some time with a guide such as

Re: [R] Boxplot, formula interface, and labels.

2017-09-28 Thread Ista Zahn
mybp <- boxplot(count ~ geno * tissue, data = mydata, plot = FALSE) mybp$names <- gsub("\\.", "\n", mybp$names) bxp(mybp) See ?boxplot for details. Best, Ista On Thu, Sep 28, 2017 at 12:40 PM, Ed Siefker wrote: > I have data I'd like to plot using the formula interface to

Re: [ESS] Upgraded ess and need to specify correct file in .emacs [SOLVED]

2017-09-03 Thread Ista Zahn
On Sun, Sep 3, 2017 at 6:47 PM, Rich Shepard wrote: > On Sun, 3 Sep 2017, Rich Shepard wrote: > >> Which of the files in that sub-directory do I specify in ~/.emacs so the >> text editor finds ess without complaining? > > > Figured this out:

Re: [R] Getting all possible combinations

2017-08-23 Thread Ista Zahn
est, Ista > > Cheers, > Bert > > > Bert Gunter > > "The trouble with having an open mind is that people keep coming along > and sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Wed, Aug 23, 2

Re: [R] Getting all possible combinations

2017-08-23 Thread Ista Zahn
On Wed, Aug 23, 2017 at 11:33 AM, Christofer Bogaso wrote: > Hi again, > > I am exploring if R can help me to get all possible combinations of > members in a group. > > Let say I have a group with 5 members : A, B, C, D, E > > Now I want to generate all possible

Re: [R] Getting all possible combinations

2017-08-23 Thread Ista Zahn
lapply(1:5, function(x) combn(groups, x)) or perhaps unlist(lapply(1:5, function(x) combn(groups, x, FUN = paste, collapse = ", "))) Best, Ista On Wed, Aug 23, 2017 at 11:33 AM, Christofer Bogaso wrote: > Hi again, > > I am exploring if R can help me to get all

Re: [R] How to install Tidyverse on Ubuntu 17.04? Getting gcc errors for -fstack-protector-strong and -Wdate-time

2017-08-17 Thread Ista Zahn
Note also that this is not the best place to ask questions about installation on Ubuntu -- please post any future Ubuntu-specific questions to the r-sig-debian mailing list. Subscription info at https://stat.ethz.ch/mailman/listinfo/r-sig-debian The tidyverse suite of packages gennerally installs

Re: [R] Efficient swapping

2017-07-06 Thread Ista Zahn
i,]$R1 <- tmp[ii,]$R2 tmp[ii,]$R2 <- qq } } How to go about this case? Thanks! On Thu, Jul 6, 2017 at 5:16 PM, Ista Zahn <istaz...@gmail.com> wrote: > How about > > foo <- with(list(r1 = tmp$R1, > r2 = tmp$R2, > swapme = (as

Re: [R] Efficient swapping

2017-07-06 Thread Ista Zahn
How about foo <- with(list(r1 = tmp$R1, r2 = tmp$R2, swapme = (as.numeric(tmp$R1) - as.numeric(tmp$R2)) %% 2 != 0), { tmp[swapme, "R1"] <- r2[swapme] tmp[swapme, "R2"] <- r1[swapme] tmp }) Best, Ista On Thu, Jul 6, 2017 at 4:06 PM, Gang Chen

Re: [R] Help with reshape/reshape2 needed

2017-07-05 Thread Ista Zahn
The reason it doesn't work easily with reshape/reshape2 is that the order of the rows is not determined. Your answer could be 1957 1958 ... 1985 1986 0.8625000 0.750 ... 0.7307692 0.2375 0.0733945 0.6435644 ...NA 0.05769231 0.5096154NA ...NA

Re: [R] Network Alternative to rJava/JRI?

2017-04-26 Thread Ista Zahn
Shiny could probably work, but https://www.opencpu.org/ is probably a better fit. Best, Ista On Wed, Apr 26, 2017 at 9:55 AM, Jake Stone wrote: > I am a java programmer, quite new to R. > > I am familiar with rJava/JRI, but would prefer a distributed networked > architecture

  1   2   3   4   5   6   7   8   9   10   >