Re: [R] Achieve independent fine user control of ggplot geom settings when using groups in multiple geom's

2015-10-29 Thread Ista Zahn
I would say in a word, 'no'. What you seem to be implying is that you want multiple color scales, multiple shape scales, etc. As far as I know there is no support for that in ggplot2. Perhaps if you show us what you're actually trying to accomplish someone can suggest a solution or at least a

Re: [R] "haven" - read_spss: How to avoid extracting value labels instead of long labels?

2015-11-13 Thread Ista Zahn
Why do you think this is a bug in have? To the contrary, I don't think this has anything to do with haven at all. The problem seems to be that attr does partial matching by default. Check it out: > attr(x, "labels") <- c("foo", "bar", "baz") > attr(x, "label") [1] "foo" "bar" "baz" and see ?attr

Re: [R] SWEAVE - a gentle introduction

2015-11-17 Thread Ista Zahn
I suggest using knitr instead of sweave. There are plenty of tutorials online; http://jeromyanglim.blogspot.co.nz/2012/05/getting-started-with-r-markdown-knitr.html?m=1 might be a good place to start. Links to a full length book and other resources are available at http://yihui.name/knitr/

Re: [R] If else

2015-10-30 Thread Ista Zahn
Using numeric for missing sounds like asking for trouble. But if you must, something like mydata$confusingWillCauseProblemsLater <- ifelse( is.na(mydata$sex), 0, as.numeric(factor(mydata$sex, levels = c("M", "F" should do it. Best, Ista On Fri, Oct 30,

Re: [R] merging-binning data

2015-11-03 Thread Ista Zahn
Probably split(binDistance, test). Best, Ista On Tue, Nov 3, 2015 at 10:47 AM, Alaios via R-help wrote: > Dear all,I am not exactly sure on what is the proper name of what I am trying > to do. > I have a vector that looks like > binDistance >[,1] > [1,]

Re: [R] merge: right set overwrite left set

2015-07-12 Thread Ista Zahn
I think this does what you want: ## find idiv coloumns in x.HHu.map that don't exist in y.HHo.map x.HHu.map - x.HHu.map[ c(HHid, position, names(x.HHu.map)[ !names(x.HHu.map) %in% names(y.HHo.map)] )] ## merge, adding extra column from x.HHu.map

Re: [R] ggplot2 will not install after system upgrade

2015-09-03 Thread Ista Zahn
Hi Jeff, Your chances of getting a useful response will increase if you provide some additional information. For example, which version of R? Which version of ggplot2? What sequence of commands produces the error? What _exactly_ does the error message say? Does update.packages(ask=FALSE,

Re: [R] what is the effective method to apply the below logic for ~1.2 million records in R

2015-09-19 Thread Ista Zahn
This assumes that the data are sorted by customer, and that only the first value of Time_Diff is missing for each customer (and that the first value is always missing for each customer). If those assumptions hold you can do something like A <- read.table(text = "customer Time_Diffflag_1 1

Re: [R] what is the effective method to apply the below logic for ~1.2 million records in R

2015-09-20 Thread Ista Zahn
se help in tweaking your code to generate the attached result. > > Awaiting for your reply > > Thanks, > Ravi > > On Sun, Sep 20, 2015 at 8:18 AM, Ista Zahn <istaz...@gmail.com> wrote: >> >> This assumes that the data are sorted by customer, and that only the >

Re: [R] Correct notation for functions, packages when using LaTex

2015-12-10 Thread Ista Zahn
While we're at it: There is another LaTeX package called minted. It has an R option to highlight R code. I've used it and it works well, though it depends on python and the pygments python package. --Ista On Thu, Dec 10, 2015 at 12:32 PM, wrote: > Erin > There is a

Re: [R] Gather columns based on multiple columns using tidyr

2015-12-17 Thread Ista Zahn
Hi Fahad, Easier than what? You didn't tell us what you tried, nor why you were unhappy with it. I'm only passingly familiar with tidyr, but I came up with library(tidyr) library(dplyr) read.table("scotland_rainfall.txt", skip = 7, header=TRUE, fill = TRUE) %>% select(-WIN, -SPR, -SUM, -AUT,

Re: [R] vjust unresponsive (ggplot2)

2015-12-22 Thread Ista Zahn
Hi Dan, Chances are that you haven't yet upgraded to ggplot2 version 2.0. unit (as well as arrow and alpha) are now re-exported from ggplot2. Using the latest release I also see that vjust doesn't seem to do anything. Best, Ista On Tue, Dec 22, 2015 at 1:37 PM, Nordlund, Dan (DSHS/RDA)

Re: [R] R studio installation and running

2015-12-23 Thread Ista Zahn
On Wed, Dec 23, 2015 at 1:04 PM, peter dalgaard wrote: > Correct me if I'm wrong, but I think the mode of operation is that you run a > local Rstudio, which connects to Rstudio server via protocol which > lets the two Rstudios communicate via Internet ports. I'm pretty sure

Re: [R] Incorrect Summarization after As.numeric

2015-12-28 Thread Ista Zahn
FAQ 7.10 perhaps. On Dec 28, 2015 10:51 AM, "SHIVI BHATIA" wrote: > Dear Team, > > > > I am working on aggregate function in R & have used the below code: > > > > aggregate(a1$Final,list(Year=a1$Year),sum) > > > > initially a1$Final was factor hence I used a1$Final=

Re: [R] vjust unresponsive (ggplot2)

2015-12-22 Thread Ista Zahn
That looks to me like it might be buggy. At least I would have expected vjust to do _something_. In terms of the practical issue, you can adjust the distance between the title and the axis with margin, e.g. ggplot(data=x,aes(x=V2,y=V2))+theme(axis.title.y=element_text(margin = margin(0, 5, 0,

Re: [R] Handling huge data of 17GB in R

2015-11-27 Thread Ista Zahn
The easy way is to use a machine with say 32 Gb of ram. You can rent them by the hour from AWS or google cloud at very reasonable prices. Best, Ista On Nov 27, 2015 8:39 AM, "Ajay Ramaseshan" wrote: > Hello, > > > I am trying the DBSCAN clustering algorithm on a

Re: [R] How to specify a data frame column using command line arg?

2016-06-06 Thread Ista Zahn
Hi Doug, ggplot lets you map variables to aesthetics in a few different ways, including passing to variable names as strings to aes_string. See ?aes_string for details. Best, Ista On Jun 6, 2016 1:03 AM, "Jim Lemon" wrote: > Yes, I see what you want. I can't run this

Re: [R] New installation

2016-06-09 Thread Ista Zahn
Perhaps r-sig-debian is more appropriate, though it is not clear to me that a debian based linux is in fact the best for running R. Of course "best" is not clearly defined here, but I highly recommend Archlinux. Best, Ista On Jun 9, 2016 6:47 PM, "Bert Gunter" wrote: > I

Re: [R] Installation of package "rio" broken

2016-06-14 Thread Ista Zahn
On Tue, Jun 14, 2016 at 3:19 PM, wrote: > Hi all, > > today I wanted to install package "rio". As it depends on package "feather" > which is only available as source I have chosen to install "rio" from source. > The installations fails with the following messages: "feather"

Re: [R] Making an if condition variable ?

2016-06-01 Thread Ista Zahn
if ( eval(parse(text=CONDITION ))) print(" a is bigger" ) Best, Ista On Jun 1, 2016 10:32 PM, "ce" wrote: > > Dear all, > > I want to make an if condition variable like : > > a = 10 > CONDITION = " a > 0 " > > if ( CONDITION ) print(" a is bigger" ) > > I tried get ,

Re: [R] Subscripting problem with is.na()

2016-06-23 Thread Ista Zahn
Suggestion: figure out the correct extraction syntax first. One you do that replacement will be easy. See ?Extract for all the messy details. Best, Ista On Jun 23, 2016 10:00 AM, wrote: > Hi All, > > I would like to recode my NAs to 0. Using a single vector everything is

Re: [R] Add column to the output of summary(glht).

2016-06-24 Thread Ista Zahn
This won't make you an R aficionado, but depending on your needs library(broom) tidy(SumTukey) might be useful. This converts the output to a familiar data.frame, making it much easier to work with. Best, Ista On Jun 24, 2016 9:48 AM, "John Sorkin" wrote: > > I am

[R] platform dependent regex

2016-02-09 Thread Ista Zahn
I just spent a day and a half debugging someone's code, only to discover that the problem is platform dependent regular expressions. For example: ## Windows: grepl("\\W", "", "س") # TRUE ## OS X: grepl("\\W", "", "س") # TRUE ## Linux: grepl("\\W", "", "س") # FALSE Ouch. The documentation

Re: [R] platform dependent regex

2016-02-09 Thread Ista Zahn
problem that you are trying to solve? > Tell me what you want to do, not how you want to do it. > > On Tue, Feb 9, 2016 at 11:55 AM, Ista Zahn <istaz...@gmail.com> wrote: >> >> I just spent a day and a half debugging someone's code, only to >> discover that the

Re: [R] determine the year of a date

2016-02-03 Thread Ista Zahn
On Wed, Feb 3, 2016 at 3:43 PM, Jeff Newmiller wrote: > Not exactly. > > If you have been "Excel"ed and have both formats in one column then you > really have a data cleanup task to do. No need to reinvent the wheel. Just do library(lubridate) mdy(c("09/01/15",

Re: [R] issue -- packages unavailable for R version -- 3.2.3

2016-02-24 Thread Ista Zahn
Posting the same question in the space of a few hours is considered by many to be very rude behavior. I have already replied to your previous message. --Ista On Feb 24, 2016 8:41 AM, "Sandeep Singha" wrote: > Hi, > > I have newly installed R version 3.2.3 and

Re: [R] issue -- Packages unavailable for R version 3.2.3

2016-02-24 Thread Ista Zahn
Installing unsupported packages is usually not a good idea (there is a reason they were removed...). But if you must: install.packages("devtools") install_version("sentiment", '0.2') Best, Ista On Wed, Feb 24, 2016 at 2:49 AM, Sandeep Rana wrote: > Hi, > > I

Re: [R] [FORGED] Use of "quote" in Windows and Linux..

2016-02-24 Thread Ista Zahn
On Wed, Feb 24, 2016 at 3:47 PM, Rolf Turner wrote: > > (1) Do not post in html. > > (2) This is the R-help forum, not the Rstudio help forum. > > (3) The call > > a1 <- quote(ID) > > works just fine under R (not Rstudio) on my Linux box. Works fine on my Linux

Re: [R] R editor for Mac

2016-01-21 Thread Ista Zahn
On Jan 21, 2016 12:01 PM, "Philippe Massicotte" wrote: > > On 01/20/2016 07:22 PM, Christofer Bogaso wrote: >> >> Hi, >> >> Could you please suggest a good R editor for Mac OS X (10.7.5) >> Previously my operating system was Windows and there I used Notepad++, >> I really

Re: [R] R editor for Mac

2016-01-21 Thread Ista Zahn
thingy is nice. I'm sticking with Emacs with ESS (via Spacemacs) for now, but will keep an eye on Atom. --Ista > > On Thu, Jan 21, 2016 at 12:48 PM, Ista Zahn <istaz...@gmail.com> wrote: >> On Jan 21, 2016 12:01 PM, "Philippe Massicotte" <pmassico...@hotmail

Re: [R] R 3.2.3 on Win8; mkdir command produces error

2016-02-14 Thread Ista Zahn
This mailing list is not meant for homework help, you should ask your instructor to clarify the assignment. Best, Ista On Feb 14, 2016 9:24 PM, "HEATHER MICHEL via R-help" wrote: > > As a follow-up to my request for help this morning, I have watched tutorials on R all

Re: [R] R 3.2.3 on Win8; mkdir command produces error

2016-02-15 Thread Ista Zahn
On Feb 15, 2016 8:53 AM, "John Kane" wrote: > > I'd say that Boris Steipe's suggestion is the most likely answer to the problem. Also, it's been a long time since I used Windows (deo gratias) but that path name does not look right. I think I would have expected something

Re: [R] Everything in ggplot2 is blue

2016-03-13 Thread Ista Zahn
color is the border, fill is the inside color. You nees aes(x = W, y = IPouts, fill = SO) Best, Ista On Mar 12, 2016 10:43 PM, "KMNanus" wrote: > I’m working with a data frame called “Koufax” (his lifetime pitching > stats) in order to improve my ggplot2 skills. > > I’ve

Re: [R] difficult to find index value

2016-03-30 Thread Ista Zahn
FAQ 7.31 I think. Here are a couple things you can try. close_enough <- function(x, y) isTRUE(all.equal(x, y)) periodlimint<-seq(from=0.1, to=50, by=0.1) indexAtest <- which(sapply(periodlimint, close_enough, y = 0.7)) match( as.character(.7), periodlimint) Best, Ista On Wed, Mar 30, 2016 at

Re: [R] Unicode Text Segmentation Algorithms already implemented in R?

2016-03-03 Thread Ista Zahn
You searched, but did not tell us what you found, nor why it was unsuitable for you undescribed use case. So all we can do is guess: my guess is http://docs.rexamine.com/R-man/stringi/stringi-search-boundaries.html Best, Ista On Mar 3, 2016 8:14 AM, "Sascha Wolfer" wrote:

Re: [R] Extracting part of a factor

2016-03-03 Thread Ista Zahn
Like this? x <- factor("001-014") y <- substr(as.character(x), 1, 3) Best, Ista On Thu, Mar 3, 2016 at 3:18 PM, KMNanus wrote: > I have a factor variable that is 6 digits and hyphenated. For example, > 001-014. > > I need to extract the first 3 digits to a new variable

Re: [R] Extracting part of a factor

2016-03-04 Thread Ista Zahn
I guess this thread has gone on long enough, but I haven't seen anyone yet suggest what to me seems like the obvious thing if you want to do this with mutate, namely testdata <- mutate(testdata, place = as.factor(substr(subject, 1, 3))) Best, Ista On Fri, Mar 4, 2016 at 10:45 PM, Boris Steipe

Re: [R] Merging Data Sets with Full Outer Join

2016-04-20 Thread Ista Zahn
Kunden <- Kunden_2011 Kunden <- merge(Kunden, Kunden_2012, by = "Debitor", all = TRUE) etc. See ?merge for details. Best, Ista On Wed, Apr 20, 2016 at 2:23 AM, wrote: > Hi All, > > I would like to match some datasets. Both deliver variables AND cases >

Re: [R] Splitting Numerical Vector Into Chunks

2016-04-20 Thread Ista Zahn
Perhaps x <- split(x, x == 0) Best, Ista On Wed, Apr 20, 2016 at 9:40 AM, Sidoti, Salvatore A. wrote: > Greetings! > > I have several large data sets of animal movements. Their pauses (zero > magnitude vectors) are of particular interest in addition to the speed

Re: [R] installation problem on Ubuntu

2016-04-21 Thread Ista Zahn
: > Yes, I tried those instructions as well with no success. > > On Wed, Apr 20, 2016 at 12:45 PM, Ista Zahn <istaz...@gmail.com> wrote: >> >> Hi Paul, >> >> Did you read the installation instructions for Ubuntu at >> https://cloud.r-project.org/bin/linu

Re: [R] Have any of you succesfully used VS Code with R? How have you set this up?

2016-07-27 Thread Ista Zahn
Hi Luis, What features do you want? What did you try? What was missing? I've not used VSCode, but for Atom check out https://atom.io/packages/repl, https://atom.io/packages/language-r, https://atom.io/packages/autocomplete-r, and possibly https://atom.io/packages/hydrogen Best, Ista On Wed,

Re: [R] Documenting data

2016-06-30 Thread Ista Zahn
On Thu, Jun 30, 2016 at 2:50 PM, wrote: > Hi Bert, > Hi Readers, > > I did not know much about attributes in R and how to use them. If it is that > flexible you are right and I have learnt something. It is that flexible, but there is a big limitation that makes them much less

Re: [R] Accessing an object using a string

2016-08-16 Thread Ista Zahn
I'm surprised no one has given what I consider to be the standard answer to this questions, namely ?get. Won't for (i in object_list) { print(paste0("Object '", i, "' in '", file_name, "' contains:")) str(get(i)) print(names(get(i))) # works } do what you want? Best, Ista On

Re: [R] Error in riv package

2016-08-17 Thread Ista Zahn
On Aug 17, 2016 12:30 PM, "Jeff Newmiller" wrote: > > Not our problem. Maybe maybe not. I'd say we don't have enough information to determine if this is on topic for R-help or not (I assume this is what you meant by 'not our problem'). Shivi, if you want help from this

Re: [R] Cannot open MTS package

2017-01-25 Thread Ista Zahn
"there is no package called 'Rcpp'" is a pretty clear error message. Did you try installing the Rcpp package? Best, Ista On Wed, Jan 25, 2017 at 6:49 AM, T.Riedle wrote: > Dear all, > > I am trying to download MTS package but when I call it using library() I get > the error

Re: [R] Current Terminal (console) width

2017-01-20 Thread Ista Zahn
ipient, is prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the original message. Thank you. P Please consider the environment before printing. On Fri, Jan 20, 2017 at 10:29 AM, Ista Zahn <istaz...@gmail.com> wrote: > On Fri, Jan 20, 201

Re: [R] Make sure a data frame has been "fun through" a function

2017-02-20 Thread Ista Zahn
It depends on what you mean by 1). If you mean "won't annoy the user" then yes, e.g., add something to the class attribute. If 1) means "can't be discovered by the user" then no (at least not easily). Anything you can see they can see. Best, Ista On Feb 20, 2017 4:21 PM, "stephen sefick"

Re: [R] R studio server vs R server and Small computer to run R

2017-01-19 Thread Ista Zahn
Hi John, I don't think this is the right place to find information about RStudio or Microsoft products. If you re-phrase the question in terms of what you want to accomplish rather than whether RStudio or Microsoft is better perhaps people here will give you some suggestions. Best, Ista On Wed,

Re: [R] Current Terminal (console) width

2017-01-20 Thread Ista Zahn
On Fri, Jan 20, 2017 at 11:52 AM, Jared Studyvin wrot: > David, > > When using native R GUI that does work because the option is checked to do > that. See Edit -> GUI Preferences... > > I'm looking for the R code that will do that same thing so when R is not > being run in

Re: [R] element wise pattern recognition and string substitution

2016-09-07 Thread Ista Zahn
m everyone. > > Jun > > On Tue, Sep 6, 2016 at 9:44 PM, Ista Zahn <istaz...@gmail.com> wrote: >> >> If you want to mach each element of 'strings' to a different regex, do >> it. Here are three ways, using your original example

Re: [R] element wise pattern recognition and string substitution

2016-09-07 Thread Ista Zahn
On Mon, Sep 5, 2016 at 12:56 PM, Jun Shen wrote: > Thanks for the reply, Bert. > > Your solution solves the example. I actually have a more general situation > where I have this dot concatenated string from multiple variables. The > problem is those variables may have

Re: [R] element wise pattern recognition and string substitution

2016-09-09 Thread Ista Zahn
ot; but much trickier if they do. However, the number of the patterns are limited by the combination of the unique values in "TX" and "WTCUT". All possible patterns can be constructed by the code I posted in this thread. Now I need to figure out a way to match the patterns to the st

Re: [R] Comparison conditionals when extracting from data.frame not working reliably

2016-09-09 Thread Ista Zahn
Use & instead of && --Ista On Sep 9, 2016 8:12 AM, "Matti Viljamaa" wrote: > I’m getting strange behaviour when trying to extract rows from a > two-column data.frame with double values. > > My data looks like: > >mom_iq kid_score > 1 121.1175065 > 2

Re: [R] Using lapply in R data table

2016-09-26 Thread Ista Zahn
2005-04-20 A 1.000 ## 4: 5 2006-02-19 B 0.8651608 ## 5: 5 2006-06-29 B 0.5092402 ## 6: 7 2006-10-08 A 0.500 ## 7: 7 2006-10-08 A 0.500 Best, Ista > > -- Bert > Bert Gunter > > "The trouble with having an open mind is that people keep coming al

Re: [R] Using lapply in R data table

2016-09-26 Thread Ista Zahn
87 > 6 7 2006-10-08 A 0.5 > 7 7 2006-10-08 A 0.5 > > > (but note that exposure is a factor, not numeric) > > > Cheers, > Bert > > Bert Gunter > > "The trouble with having an open mind is that people keep coming along > and

Re: [R] Using lapply in R data table

2016-09-26 Thread Ista Zahn
Hi Frank, lapply(DT) iterates over each column. That doesn't seem to be what you want. There are probably better ways, but here is one approach. DT[, exposure := vector(mode = "numeric", length = .N)] DT[fini < as.Date("2006-01-01"), exposure := 1] DT[fini >= as.Date("2006-01-01") & fini <=

Re: [R] element wise pattern recognition and string substitution

2016-09-07 Thread Ista Zahn
If you want to mach each element of 'strings' to a different regex, do it. Here are three ways, using your original example. pattern1 <- "([^.]*)\\.([^.]*\\.[^.]*)\\.(.*)" pattern2 <- "([^.]*)\\.([^.]*)\\.(.*)" patterns <- c(pattern1,pattern2) strings <- c('TX.WT.CUT.mean','mg.tx.cv') for(i in

Re: [R] Looping through data tables (or data frames) by removing previous individuals

2016-10-03 Thread Ista Zahn
Hi Frank, How about library(lubridate) dtf <- merge(dt, expand.grid(id = dt$id, refdate = v), by = "id") dtf[, gt65 := as.period(interval(fborn, refdate), unit = "years") > years(65)] dtf <- dtf[gt65 == TRUE,][, .SD[refdate == min(refdate)], by = id] Best, Ista On Mon, Oct 3, 2016 at 1:17 PM,

Re: [R] loop with variable names

2016-11-04 Thread Ista Zahn
It's hard to imagine a situation where this makes sense, but of course you can do it if you want. Perhaps rhs <- unlist(sapply(1:(ncol(df)-1), function(x) apply(combn(names(df)[-1], x), 2, paste, collapse = " + "))) lapply(rhs, function(x) lm(as.formula(paste("y ~", x)), data = df)) --Ista On

Re: [R] Stop R script from running, when the memory goes beyond 15.4GB

2016-11-05 Thread Ista Zahn
See man ulimit Best, Ista On Nov 5, 2016 8:11 AM, "Priya Arasu via R-help" wrote: > Hi, > I am using R 3.3.1 in RedHat Linux7 , 64bit system (16GB RAM). I > could run simulation in R package, Boolnet for 25 genes without any > problem. When I add more gene i.e. 26

Re: [R] Extract word from string based on pattern match

2016-10-24 Thread Ista Zahn
On Oct 24, 2016 6:05 PM, "Joe Ceradini" wrote: > > Excellent - thanks David! > Regex syntax never fails to scare the crap out of me :) > > David absolutely solved my problem (in record time, no less), so it > can be put to rest. However, if anyone knows how to accomplish

Re: [R] Memory problem

2016-11-22 Thread Ista Zahn
Not conveniently. Memory is cheap, you should buy more. Best, Ista On Nov 22, 2016 12:19 PM, "Partha Sinha" wrote: > I am using R 3.3.2 on win 7, 32 bit with 2gb Ram. Is it possible to use > more than 2 Gb data set ? > > Regards > Partha > > [[alternative HTML

Re: [R] Alternative to "apply" in R 3.2.2

2016-11-11 Thread Ista Zahn
What makes you think " apply' does not work in R 3.2.2"? On Nov 11, 2016 6:24 PM, "Olu Ola via R-help" wrote: > Hello,I quite understand that apply is doing what it is supposed to do. I > actually found that example online. However, "apply" package is not > compatible with

Re: [R] R XML package on RHEL

2016-12-07 Thread Ista Zahn
As far as I know you only need libxml and libxml2-devel. Do you have those installed? --Ista On Wed, Dec 7, 2016 at 8:00 AM, Das Neves, David, Vodacom South Africa wrote: > Hi > > I am trying install the XML package on R 3.3.0 on RHEL. After it complained >

Re: [R] Why is DocumentTermMatrix showing 0 term?

2016-12-06 Thread Ista Zahn
Hi Patrick, How could anyone possibly answer this question with only the information you've provided? It's like showing me an empty cup and asking why it's empty. Maybe you didn't put anything in it. Maybe you did and then you dog drank it or your cat knocked it over or your girlfriend drank it.

Re: [R] Why is DocumentTermMatrix showing 0 term?

2016-12-06 Thread Ista Zahn
t;- tm_map(docs, stripWhitespace) >> docs <- tm_map(docs, stemDocument) >> dtm <- DocumentTermMatrix(docs) >> dtm > <> > Non-/sparse entries: 0/0 > Sparsity : 100% > Maximal term length: 0 > Weighting : term frequency (tf) >>

Re: [R] Forecast Modeling using R model node in SPSS Modeler

2016-12-06 Thread Ista Zahn
do it, I > will make sure I share it with the rest of the R user community. > > Anyway, thank you for your quick and kind reply, > > Best of regards, > > Paul > > 2016-12-05 16:31 GMT-05:00 Ista Zahn <istaz...@gmail.com>: > >> Hi Paul, >> >> I sugg

Re: [R] R XML package on RHEL

2016-12-07 Thread Ista Zahn
> /usr/lib64/libldap-2.3.so.0.2.31 > /usr/lib64/libldap_r-2.3.so.0 > /usr/lib64/libldap_r-2.3.so.0.2.31 > /usr/lib64/sasl2/libldapdb.so > /usr/lib64/sasl2/libldapdb.so.2.0.23 > /usr/lib64/sasl2/libldapdb.so.2 > /usr/lib64/libldap-2.3.so.0 > /usr/lib64/thunderbird/libldap60.so

Re: [R] Odd behaviour of mean() with a numeric column in a tibble

2016-12-10 Thread Ista Zahn
[1,1:2]] >>[1] "b" >>> >> >>So [[a,b]] works if a and b are legal with the dimensions of the tibble >>and if a is of length 1 but returns NOT a tibble but a vector of length >>1 (I think), I can see that's logical but not what it says in the >>docume

Re: [R] Odd behaviour of mean() with a numeric column in a tibble

2016-12-06 Thread Ista Zahn
bble". > > And row subsetting/indexing has gone. Whatever do you mean? > tmpTibble[tmpTibble$ID == "d", ] # A tibble: 1 × 2 ID num 1 d 4 > > Why create replacement for a dataframe that has no row indexing and so > radically redefines column in

Re: [R] Why is DocumentTermMatrix showing 0 term?

2016-12-06 Thread Ista Zahn
> [[2]] > <> > Metadata: 7 > Content: chars: 9312 > > [[3]] > <> > Metadata: 7 > Content: chars: 1388 > > [[4]] > <> > Metadata: 7 > Content: chars: 2366 > > > > > From: Ista Zahn <is

Re: [R] Why is DocumentTermMatrix showing 0 term?

2016-12-06 Thread Ista Zahn
: 70% > Maximal term length: 29 > Weighting : term frequency (tf) > > > > > From: Ista Zahn <istaz...@gmail.com> > Sent: Tuesday, December 6, 2016 12:20:57 PM > > To: Patrick Casimir > Cc: r-help@r-project.org > Subjec

Re: [R] Forecast Modeling using R model node in SPSS Modeler

2016-12-05 Thread Ista Zahn
Hi Paul, I suggest forgetting about SPSS and using R directly. Getting started with R is easier than ever thanks to the growing number of tutorials, workshops, mailing lists and forums. Best, Ista On Mon, Dec 5, 2016 at 4:09 PM, Paul Bernal wrote: > Hello everyone, > >

Re: [R] Problem with IRkernel Installation Solved - Instructions on how to Solve it

2017-01-06 Thread Ista Zahn
On Fri, Jan 6, 2017 at 8:43 AM, Paul Bernal wrote: > Dear friends, > > Great news! I was able to install the IRkernel successfully and I am now > able to create R notebooks in Jupyter. Congratulations. Just in case anybody out there is > struggling with this too, here

Re: [R] Problem with IRkernel Installation Solved - Instructions on how to Solve it

2017-01-06 Thread Ista Zahn
and exactly what happened. Best, Ista Regards, Paul 2017-01-06 13:00 GMT-05:00 Ista Zahn <istaz...@gmail.com>: > On Fri, Jan 6, 2017 at 8:43 AM, Paul Bernal <paulberna...@gmail.com> > wrote: > > Dear friends, > > > > Great news! I was able to install the IRk

Re: [R] ggplot2 package: argument of expand with scale_x_discrete()

2016-12-29 Thread Ista Zahn
Use coord_fixed() --Ista On Thu, Dec 29, 2016 at 9:59 AM, Fix Ace via R-help wrote: > > > > Hello, there, > What exactly does "expand" do for this function? > I followed the examples from the manual to get a plot: > > d <- ggplot(subset(diamonds, carat > 1), aes(cut,

Re: [R] dataframe columns class

2016-12-18 Thread Ista Zahn
Read ?apply and you shall be be enlightened. --Ista On Dec 18, 2016 12:09 PM, "Cleber N.Borges via R-help" wrote: > Why columns classes are function dependents? > Like this example: > > > for( i in 1:5 ) print( class( iris[,i] ) ) > [1] "numeric" > [1] "numeric" > [1]

Re: [R] Odd behaviour of mean() with a numeric column in a tibble

2016-12-06 Thread Ista Zahn
Not at a computer to check right now, but I believe single bracket indexing a tibble always returns a tibble. To extract a vector use [[ On Dec 6, 2016 4:28 PM, "Chris Evans" wrote: > > I hope I am obeying the list rules here. I am using a raw R IDE for this and running

Re: [R] Presentation Quality Tables, e.g., Ten rows, Five columns, with nice headers

2017-03-26 Thread Ista Zahn
You're going to have to be more specific. What output format? What packages did you find and in what ways are they unsatisfactory? Best, Ista On Mar 26, 2017 2:22 PM, "MyCalendar" wrote: Hi R'ers: After browsing for a good package for quality table construction, I found

Re: [R] Difference between R for the Mac and for Windows

2017-03-31 Thread Ista Zahn
The only place I've noticed differences is in encoding and string sorting, both of which are locale and library dependent. Best, Ista On Mar 31, 2017 8:14 AM, "Neil Salkind" wrote: > Can someone please direct me to an answer to the question as to how R > differs for

Re: [R] Asking for help

2017-04-19 Thread Ista Zahn
For help in formulating your question in a way that makes it easy to help you see http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example When asking for help on the R-help mailing list in particular, make sure to send plain-text email. Best, Ista On Wed, Apr 19,

Re: [R] Problem with greek characters in R

2017-03-09 Thread Ista Zahn
On Thu, Mar 9, 2017 at 11:48 AM, Jeff Newmiller wrote: > The standard response is that RStudio is not R, and has its own forum or > discussion areas on stackexchange.com. But the OP didn't mention RStudio, but rather RGui. R has its own mechanisms for dealing with

Re: [R] display UTF8 characters in pdf

2017-03-10 Thread Ista Zahn
install.packages("emojifont") library(emojifont) ... # plot as before. Best, Ista On Fri, Mar 10, 2017 at 11:06 AM, Thierry Onkelinx wrote: > Dear all, > > I'd like to use some UTF-8 characters in a plot. Some of them are not > rendered with saving the plot as pdf.

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] 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] 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] Counting enumerated items in each element of a character vector

2017-04-25 Thread Ista Zahn
stringr::str_count (and stringi::stri_count that it wraps) interpret the pattern argument as a regular expression by default. Best, Ista On Tue, Apr 25, 2017 at 11:40 PM, Michael Hannon wrote: > I like Boris's "Hadley" solution. For the record, I've appended a >

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

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] 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: [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] 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] 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] 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] 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] 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] 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] 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

<    5   6   7   8   9   10   11   >