Re: [R] nested for loop with data table

2017-05-03 Thread Jeff Newmiller
You seem to be unaware of the "aggregate" data processing concept. There are many ways to accomplish aggregation, but I am not fluent in data.table methods but knowing the concept is the first step. Perhaps look closely at [1], or Google for data table aggregation yourself? [1] https://www.r-

Re: [R] Formatting column displays

2017-05-05 Thread Jeff Newmiller
Data frames are primarily data storage objects, not data display objects. You can create a separate version of your data frame with formatted text strings, but what you usually really want is to handle column alignment as well and that really has to be addressed as part of your data output proce

Re: [R] loading edited functions already in saved workspace automatically

2017-05-05 Thread Jeff Newmiller
The answer most people seem to use is to avoid depending on functions in RData files, and in particular avoiding ever saving the "automatic" ".RData" files at all. (Some people avoid using any RData files, but the automatic loading of functions by ".RData" files is a particularly pernicious sour

Re: [R] loading edited functions already in saved workspace automatically

2017-05-05 Thread Jeff Newmiller
R normally prompts you to save .RData, but it just automatically saves .Rhistory... the two are unrelated. -- Sent from my phone. Please excuse my brevity. On May 5, 2017 6:44:50 AM PDT, Ralf Goertz wrote: >Am Fri, 05 May 2017 06:30:01 -0700 >schrieb Jeff Newmiller : > >>

Re: [R] loading edited functions already in saved workspace automatically

2017-05-05 Thread Jeff Newmiller
Read ?history. Seems somewhat platform dependent, but they ARE different. -- Sent from my phone. Please excuse my brevity. On May 5, 2017 7:23:14 AM PDT, Ralf Goertz wrote: >Am Fri, 05 May 2017 07:14:36 -0700 >schrieb Jeff Newmiller : > >> R normally prompts you to save .RDa

Re: [R] Problems installing IsoriX package in R

2017-05-05 Thread Jeff Newmiller
If by "this problem" you mean the error "no package named x" then yes. It means you need to find the "proxy" package or find an updated version of the package that required the "proxy" package. Since it is on CRAN [1], it might be as simple as installing the package, or your preferred mirror mi

Re: [R] Extract cells and their adjacent cells that may appear anywhere in a dataframe.

2017-05-08 Thread Jeff Newmiller
Please don't post in HTML... what YOU see is almost never what WE see (look below for something like what I saw). Read the Posting Guide for more help on how to use the list, including the recommendation to formulate your question as a minimal R example (runnable code). See for example [1] and/o

Re: [R] loading edited functions already in saved workspace automatically

2017-05-09 Thread Jeff Newmiller
file, made a package `myutil` and now load > >them from there with > > #== > # load default packages > #== > if (!require(myutil)) warning("myutil functions not available") > >hope this helps, >-Michael > >

Re: [R] Plotting bar charts by Month

2017-05-09 Thread Jeff Newmiller
For this kind of plot I usually use day-of-month for for the x-axis instead of a date or timestamp. -- Sent from my phone. Please excuse my brevity. On May 9, 2017 6:55:27 PM PDT, Jeff Reichman wrote: >r-help > > > >Trying to figure out how to plot by month bar charts. The follow code >plots

Re: [R] Matched Items in rows + issue with writing a table

2017-05-12 Thread Jeff Newmiller
Jim is generous enough that he might do this, but such assistance is not sustainable. Fortunately, you can type a ? in front of the name of a function and read about what goes in and what comes out. You can also type expressions like x[2] or which(matches) right before you execute the line of co

Re: [R] Extracting metadata information to corresponding dissimilarity matrix

2017-05-16 Thread Jeff Newmiller
Hello R Beginner... It is good that you are articulate, but R code has subtleties that words miss, so you really need to provide sample code and sample data to convey where you are. This is not necessarily easy, but it avoids a lot of us fixing the wrong problem and you might even solve your o

Re: [R] violin plot help

2017-05-16 Thread Jeff Newmiller
Read A) the Posting Guide (re plain text only... your emails may be damaged by the mailing list if you send html-formatted email... only you can solve this by figuring out how to use your email software) B) Help on assignment (?`=`) C) Help on logical tests (?`==`) -- Sent from my phone. Please

Re: [R] violin plot help

2017-05-16 Thread Jeff Newmiller
; and "==" , they work the same in Stata and SAS. > >Omar >-Original Message- >From: Jeff Newmiller [mailto:jdnew...@dcn.davis.ca.us] >Sent: Tuesday, May 16, 2017 11:43 AM >To: r-help@r-project.org; Abdelrahman, Omar (RER) >; 'r-help@r-project.org' &

Re: [R] violin plot help

2017-05-17 Thread Jeff Newmiller
0.31 CD01A Mouth C-100 2/7/2013Phosphorus, Total (TP) 0.004 CD01A Mouth C-100 2/7/2013Chlorophyll-A 0.4 CD02EastC-100 2/7/2013Phosphorus, Total (TP) 0.011 CD05Central C-100 2/7/2013Phosphorus, T

Re: [R] Question about change the length of a string.

2017-05-18 Thread Jeff Newmiller
http://stackoverflow.com/questions/2261079/how-to-trim-leading-and-trailing-whitespace-in-r -- Sent from my phone. Please excuse my brevity. On May 18, 2017 8:57:51 PM PDT, Yen Lee wrote: >Hello everyone, > > > >I have a question and I need your precious kind help. > > > >I am working on matc

Re: [R] [FORGED] Logical Operators' inconsistent Behavior

2017-05-19 Thread Jeff Newmiller
FALSE & FALSE -> FALSE FALSE & TRUE -> FALSE Why do you need to know what the second value is? It doesn't matter what it is... the answer is FALSE. -- Sent from my phone. Please excuse my brevity. On May 19, 2017 5:24:06 AM PDT, "Jérémie Juste" wrote: >My apologies if I was not clear enough,

Re: [R] PROBLEM USING DICTIONARY WITH TM PACKAGE

2017-05-19 Thread Jeff Newmiller
Considering the deafening silence after three repeats, one explanation could be that you are asking the wrong group of people. It is also possible that your failure to follow the Posting Guide with regard to using plain text email and a reproducible example [1][2] means that readers who are not

Re: [R] Duplicate row names are not allowed

2017-05-22 Thread Jeff Newmiller
Start with the Posting Guide mentioned at the bottom of this email. Note that only a very few types of attachments are permitted on this list... yours apparently were not. We generally find that providing a reproducible example that includes the data in the R code and the statements that cause

Re: [R] problem with system.file

2017-05-22 Thread Jeff Newmiller
Did not look to me like Windows was a factor here... OP referred to /home/paumarc/Bam. I think the issue was trying to access his own data using an inappropriate function. -- Sent from my phone. Please excuse my brevity. On May 22, 2017 3:22:06 PM PDT, Jim Lemon wrote: >Windows. A funny name f

Re: [R] Installing ranger package in Ubuntu 14

2017-05-23 Thread Jeff Newmiller
A) This should be asked on R-sig-debian or R-devel. This list is about the R language and basic installation issues... compiled installation debugging requires OS and C language skills that are OT here. B) You should read and follow the advice in the Posting Guide for all R mailing lists, spe

Re: [R] Cause of error assigning NULL to element of a vector

2017-05-24 Thread Jeff Newmiller
Perhaps it is worth pointing out (in case the OP thinks this is SQL) that the special value NA is used for "missing" in R. y[1] <- NA works just fine. -- Sent from my phone. Please excuse my brevity. On May 24, 2017 11:51:41 AM PDT, Marc Schwartz wrote: > >> On May 24, 2017, at 1:30 PM, Ramn

Re: [R] Help in R code

2017-05-25 Thread Jeff Newmiller
Read the Posting Guide. Assuming your question is not about homework or statistics, the answer is probably yes. After reading the the Posting Guide you will also know that this is a plain text email list so you will need to set your email program appropriately. You will also know that a minimal

Re: [R] creat contingency tables with fixed row and column margins

2017-05-27 Thread Jeff Newmiller
Ah, but the point is that you did not say why those search results did not address your question, since if they DID answer your question then why should we have to be doing your searching for you? -- Sent from my phone. Please excuse my brevity. On May 27, 2017 1:54:18 PM PDT, li li wrote: >

Re: [R] rollapply() produces NAs

2017-05-28 Thread Jeff Newmiller
You will get better help if you read the Posting Guide mentioned at the foot if every posting including this one carefully and pay attention. A) You need to post in plain text, as your code came through the mailing list damaged. B) You need to include sample data and make your code run from a

Re: [R] finding components of an API

2017-05-28 Thread Jeff Newmiller
Can you please be just a little less vague? What API are you talking about, and how is this related to R? -- Sent from my phone. Please excuse my brevity. On May 28, 2017 11:48:42 AM PDT, Erin Hodgess wrote: >Hello! > >I would like to use a particular API for crimes (spot crimes) but I >can't >

Re: [R] get the value of a biplane

2017-05-28 Thread Jeff Newmiller
Looks like it is not exported from the package namespace... a packaging error. -- Sent from my phone. Please excuse my brevity. On May 28, 2017 1:53:29 PM PDT, Rui Barradas wrote: >Hello, > >Can anyone explain why this error? > > > library(splines) > > > > knots <- c(6, 12, 22, 30, 35) > > x <-

Re: [R] get the value of a biplane

2017-05-29 Thread Jeff Newmiller
>>could not find function "predict.bs" > >You should call it using the generic, i.e. > >predict(SCurve, xnew = 40:45) > > >On 29/05/2017 2:35 AM, Jeff Newmiller wrote: >> Looks like it is not exported from the package namespace... a >packaging error. &

Re: [R] about Rstudio

2017-05-29 Thread Jeff Newmiller
Did you follow the instructions at https://cran.r-project.org/bin/linux/ubuntu/README.html? -- Sent from my phone. Please excuse my brevity. On May 29, 2017 2:07:27 PM PDT, Bogdan Tanasa wrote: >Hi Bert, thank you for your email. yes, of course, i did the google >searches before posting, althou

Re: [R] ggplot: Pie Chart with correct labels

2017-05-30 Thread Jeff Newmiller
>1. get the order of the labels right You need to order your labels in the Land factor correctly when you create it with the factor function, which was (not) done here but rather before you used dput to generate this code. >2. Why I need to reference "breaks" and "labels" completely? Read the

Re: [R] Need Help - R Programming - Using iteration value to change field names for processing for every iteraion

2017-05-30 Thread Jeff Newmiller
That is not possible... this is just a thread of emails. The closest you can get is to clearly indicate what solution worked for you so that people following along now it in the archives later know how your question was answered. -- Sent from my phone. Please excuse my brevity. On May 30, 201

Re: [R] odfWeave - A loop of the "same" data

2017-06-01 Thread Jeff Newmiller
I do this regularly with knitr [1]. I have never used odfWeave, but would imagine that similar principles apply. If you make a child document that assumes that the desired data are stored in one or more objects, then you can use a for loop in the master document that repeatedly extracts the de

Re: [R] Reversing one dimension of an array, in a generalized case

2017-06-01 Thread Jeff Newmiller
if i try: junk1 <- apply(junk, 2, rev) junk1 comes out as two-dimensional, not three-dimensional. It is probably something obvious but I am not getting it. Thanks for any help. -Roy ------- Jeff Newmiller

Re: [R] New var

2017-06-02 Thread Jeff Newmiller
You do understand that this is not the "do my work for me" mailing list, don't you? You should be asking questions like "why doesn't my code do one of these if conditions?" so that you know HOW to write the rest of them yourself. In addition you have been posting here long enough to know that y

Re: [R] New var

2017-06-03 Thread Jeff Newmiller
47, 1, -1, -1, -1, -1 Thank you. [[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.html and provide commented, minima

Re: [R] Hi

2017-06-05 Thread Jeff Newmiller
Your function has mismatching parentheses. I recommend using a computer algebra system like Maxima. -- Sent from my phone. Please excuse my brevity. On June 5, 2017 4:33:56 AM PDT, Moshe Kelner wrote: >Hi , > >I'm asking for a way to compute the integral of: function(x) >{x*(log(x)+b)*((log(x)

Re: [R] R] Error message "cs_lu(A) failed: near-singular A (or out of memory)"

2017-06-05 Thread Jeff Newmiller
This appears to be a case of insufficient understanding of statistics, which is not on topic for r-help. Look at how well the per-firm models would work... my guess is that some of the firms have insufficient data for useful analysis. If that is not it, consider providing a more concrete example

Re: [R] Determining which.max() within groups

2017-06-07 Thread Jeff Newmiller
the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

Re: [R] Adding zeros in each dimension of an array

2017-06-07 Thread Jeff Newmiller
l, self-contained, reproducible code. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/

Re: [R] purrr::pmap does not work

2017-06-07 Thread Jeff Newmiller
fo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

Re: [R] error while opening vignette DESeq2

2017-06-07 Thread Jeff Newmiller
ented, minimal, self-contained, reproducible code. ------- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live

Re: [R] Problem related to rowSums

2017-06-07 Thread Jeff Newmiller
thz.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. ------- Jeff NewmillerThe

Re: [R] Matrix multiplication

2017-06-07 Thread Jeff Newmiller
Is this a question? You seem to have three possible calculations, have already implemented two of them (?) and it is unclear (to me) what you think the right answer for any of them is supposed to be. -- Sent from my phone. Please excuse my brevity. On June 7, 2017 8:50:55 PM PDT, Steven Yen w

Re: [R] Matrix multiplication

2017-06-07 Thread Jeff Newmiller
ine) is what I >need: > >set.seed(76543211) >w<-1:10; w >a<-matrix(rpois(20,2),nrow=10); a >t(w*a)%*%a > >On 6/8/2017 12:09 PM, Jeff Newmiller wrote: >> Is this a question? You seem to have three possible calculations, >have already implemented two of them (?) and

Re: [R] DESeq2 pairwise compasion

2017-06-08 Thread Jeff Newmiller
I think you are asking on the wrong mailing list. Perhaps you should be asking this question on the Bioconductor mailing list? -- Sent from my phone. Please excuse my brevity. On June 8, 2017 7:35:55 AM PDT, Yogesh Gupta wrote: >There are two line 216 and 218 > >Three development stages 5 WEEK

Re: [R] Math ops behaviour with multiple classes

2017-06-08 Thread Jeff Newmiller
Cole, that cow left the barn decades ago. You really should read Patrick Burns' discussion of the history of R [1]. [1] http://www.burns-stat.com/documents/presentations/inferno-ish-R/ -- Sent from my phone. Please excuse my brevity. On June 8, 2017 3:48:23 PM PDT, "Beck, Cole" wrote: >Thanks

Re: [R] remove

2017-06-10 Thread Jeff Newmiller
You are using a slash in your format string to separate sub-fields but your data uses a dash. -- Sent from my phone. Please excuse my brevity. On June 10, 2017 8:18:37 PM PDT, Val wrote: >Hi all, >I have a date issue and would appreciate any help. > >I am reading a field data and n one of th

Re: [R] remove

2017-06-11 Thread Jeff Newmiller
The usual way I filter is: KL$Dt <- as.Date( KL$date, format='%d-%m-%y' ) KL2 <- KL[ !is.na( KL$Dt ), ] -- Sent from my phone. Please excuse my brevity. On June 10, 2017 10:17:52 PM PDT, Jeff Newmiller wrote: >You are using a slash in your format string to separate sub-fi

Re: [R] How Can I Execute a String Expression?

2017-06-12 Thread Jeff Newmiller
R is not a very good macro language... I recommend against this strategy. We could be more concrete in offering alternatives if you were a little more complete in your reproducible example [1][2][3]. What variations exactly were you thinking of? What kind of data are you working with? The way yo

Re: [R] draw stripes in a circle in R

2017-06-14 Thread Jeff Newmiller
I don't see a question. If your question is whether R supports pattern fills, AFAIK it does not. If that is not your question, ask one. -- Sent from my phone. Please excuse my brevity. On June 14, 2017 7:57:41 AM PDT, jean-philippe wrote: >dear R users, > >I would like to fill a circle with y

Re: [R] [FORGED] Re: draw stripes in a circle in R

2017-06-14 Thread Jeff Newmiller
PDT, Rolf Turner wrote: >On 15/06/17 05:29, David Winsemius wrote: >> >>> On Jun 14, 2017, at 10:18 AM, David Winsemius > wrote: >>> >>> >>>> On Jun 14, 2017, at 9:46 AM, Jeff Newmiller > wrote: >>>> >>>> I don't

Re: [R] [FORGED] Re: draw stripes in a circle in R

2017-06-14 Thread Jeff Newmiller
gt; wrote: >>>> >>>> >>>>> On Jun 14, 2017, at 9:46 AM, Jeff Newmiller > wrote: >>>>> >>>>> I don't see a question. If your question is whether R supports >pattern fills, AFAIK it does not. If that is not your qu

Re: [R] is.null(mylist[1]) and is.null(mylist$a) returns different values

2017-06-15 Thread Jeff Newmiller
I find that the str function is more helpful for understanding the difference between a null list and a list containing a null list than the implicit print function call that the interpreter invokes when you enter an expression at the console. str( mylist[1] ) -- Sent from my phone. Please e

Re: [R] (no subject)

2017-06-17 Thread Jeff Newmiller
You desperately need to read the Posting Guide... A) There is a no homework policy on this list. If this is for a class, stop now and go use the assistance resources offered by your educational institution. B) This is a plain text mailing list so the table formatting you saw when you sent this

Re: [R] write.dna command

2017-06-17 Thread Jeff Newmiller
I suspect you meant WD <- "~/Documents/Scripting/R_Studio/Sequences/" but I am entirely unfamiliar with the packages you are using, and know nothing about what is on your hard drive. For future reference: A) Read the Posting Guide. This is a plain text email list, and your html formatting g

Re: [R] Prediction with two fixed-effects - large number of IDs

2017-06-17 Thread Jeff Newmiller
I have no direct experience with such horrific models, but your formula is a mess and Google suggests the biglm package with ffdf. Specifically, you should convert your discrete variables to factors before you build the model, particularly since you want to use predict after the fact, for whic

Re: [R] R_using non linear regression with constraints

2017-06-18 Thread Jeff Newmiller
http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-h

Re: [R] translate formula into R code

2017-06-20 Thread Jeff Newmiller
This is an excellent exercise for you, the beginner. If you explicitly want a line-by-line translation and don't want to use the strengths of R (vectorization/functions) then there isn't much point in asking us to read the Introduction to R document that comes with the software for you. Please

Re: [R] translate formula into R code

2017-06-20 Thread Jeff Newmiller
hat I forgot to change res back to LSS. > >2017-06-20 15:46 GMT+02:00 Jeff Newmiller : >> This is an excellent exercise for you, the beginner. If you >explicitly want a line-by-line translation and don't want to use the >strengths of R (vectorization/functions) then there i

Re: [R] Problem with shortestPath in igraph and qgraph

2017-06-20 Thread Jeff Newmiller
Hard to follow data analysis without data. Try making your example reproducible [1][2][3] and post in plain text (a setting in your emailer). Read the Posting Guide mentioned in the footer to avoid other posting pitfalls. [1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-rep

Re: [R] selecting dataframe columns based on substring of col name(s)

2017-06-21 Thread Jeff Newmiller
d[ , paste( "col", 2:4 ) ] or d[ , sprintf( "col%d", 2:4 ) ] or d[ , grep( "^col[234]$", names( d ) ] Each approach has different ways of being flexible. -- Sent from my phone. Please excuse my brevity. On June 21, 2017 9:11:10 AM PDT, Evan Cooch wrote: >Suppose I have the following sort of

Re: [R] Help with packages

2017-06-21 Thread Jeff Newmiller
Whatever you do, don't use "Run As Administrator" to install R unless you know exactly why and how you plan to fix the resulting mess. It is normal not to be able to update the library under Program Files. It is not normal (in my experience) to have problems creating the library under your Doc

Re: [R] Counting with multiple criteria using data table

2017-06-21 Thread Jeff Newmiller
To be fair, the OP did provide brief snippets of data.table usage below the data dump indicating some level of effort, but posted it all in HTML (what you see we do not see), did not make the example reproducible (dput is great, and library calls really clear things up [1][2][3]), and this looks

Re: [R] Cross-Validation for Zero-Inflated Models

2017-06-21 Thread Jeff Newmiller
1) Helpdesk implies people whose job it is to provide support. R-help is a mailing list in which users help each other when they have spare time. 2) You sent an email to the R-help mailing list, not to Lara, whoever that is. I suggest you figure out what her email address is and send your quest

Re: [R] Question

2017-06-22 Thread Jeff Newmiller
Rows are horizontal, columns are vertical. You really need to spend some time with an R tutorial. dta <- read.table( "yourfile", header=TRUE, as.is=TRUE ) dta2 <- dta dta2$D <- c( "awe", "abcd", "asdf", "xyz" ) dta2 <- dta2[ , c( "A", "D" ) ] -- Sent from my phone. Please excuse my brevity. On

Re: [R] Question

2017-06-22 Thread Jeff Newmiller
This is not a Spark-help mailing list, either. -- Sent from my phone. Please excuse my brevity. On June 22, 2017 4:20:36 PM PDT, Amrith Deepak wrote: >This function won’t work with objects in spark as you can’t do a dfda$a >in spark as it’s not stored as a local variable. > >Thanks, >Amrith > >

Re: [R] MODISTools help - with reproducible examples

2017-06-23 Thread Jeff Newmiller
Please read up [1][2][3] on what constitutes reproducibility. A sample of data that triggers the problem is essential. [1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example [2] http://adv-r.had.co.nz/Reproducibility.html [3] https://cran.r-project.org/web/

Re: [R] Execute R codes without installing R environment

2017-06-24 Thread Jeff Newmiller
1) Producing a zip file most likely means you put your code in a package. This can be a useful thing to do, but it most definitely does not create a standalone executable. 3) You have not communicated your goal clearly. Many people want to treat R on a server as a remote compute resource... y

Re: [R] Writing my 3D plot function

2017-06-25 Thread Jeff Newmiller
Please look at what I see in your code below (run-on code mush) to understand part of why it is important for you to send your email as plain text as the Posting Guide indicates. You might find [1] helpful. [1] https://wiki.openstack.org/wiki/MailingListEtiquette -- Sent from my phone. Please

Re: [R] rJava Broken on Linux + R 3.4

2017-06-25 Thread Jeff Newmiller
I can't think of a more appropriate time to point out that there is an r-sig-debian mailing list that focuses on operating-system-related issues like this. -- Sent from my phone. Please excuse my brevity. On June 25, 2017 6:47:10 PM EDT, Lorenzo Isella wrote: >Dear All, >I think there is some

Re: [R] ggplot2 geom_bar arrangement

2017-06-28 Thread Jeff Newmiller
In the general case it is not possible to do as you ask because "Lab" can be duplicated. However, in your specific case it is unique in your data frame, so you just have to control the order of the factor labels instead of letting them be set up in the default manner. Of course, you have to be a

Re: [R] Finding optim.R function

2017-06-28 Thread Jeff Newmiller
Much of R is implemented using C or Fortran. You are on a wild goose chase. There are contributed packages that you probably ought to investigate before modifying optim, though. https://cran.r-project.org/web/views/Optimization.html -- Sent from my phone. Please excuse my brevity. On June 27,

Re: [R] Nash equilibrium and other game theory tools implemented in networks using igraph or similar

2017-06-28 Thread Jeff Newmiller
In what way does reminding people that packages exist because others just like them contributed something count as being uncivil? Terse, perhaps, since it bypassed the obvious suggestion to use a search engine, but not rude. -- Sent from my phone. Please excuse my brevity. On June 28, 2017 5:08

Re: [R] Nash equilibrium and other game theory tools implemented in networks using igraph or similar

2017-06-28 Thread Jeff Newmiller
rote: >I responded to the unhelpful suggestion "Why don't you implement and >uplad the package to CRAN?" No mention of a search engine. Is this >what you are commenting on Jeff? > > > > > >> On Jun 28, 2017, at 5:41 AM, Jeff Newmiller > wrote: >>

Re: [R] help needed for RInside with Qt

2017-06-28 Thread Jeff Newmiller
If you adhere to the terms of the license for R you should be okay legally. If you use contributed packages they may have additional requirements. However, these terms are often overlooked by programmers targeting Windows, hence Bert's caution. As to the content of the original post itself, it

Re: [R] Different date formats in one column

2017-06-28 Thread Jeff Newmiller
_ 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. -

Re: [R] Different date formats in one column

2017-06-29 Thread Jeff Newmiller
On Wednesday, June 28, 2017 10:49 PM, Jeff Newmiller > wrote: > > > I doubt your actual file looks like the mess that made it to my email >software (below) because you posted HTML-format email. Read the Posting > >Guide, and in particular figure out how to send plain te

Re: [R] about reading files in order

2017-06-30 Thread Jeff Newmiller
See http://en.wikipedia.org/wiki/Internet_troll -- Sent from my phone. Please excuse my brevity. On June 30, 2017 10:50:45 AM EDT, lily li wrote: >Who is this person and what did he/she mean? > >On Fri, Jun 30, 2017 at 1:48 AM, Kindell Young >wrote: > >> >> On Jun 29, Silly FAGGOTS DICKS [R] 4

Re: [R] R and UBUNTU startup

2017-07-04 Thread Jeff Newmiller
Q1. No. Q2. What do you do? Did you follow the instructions at [1]? If you go to the top level of the R help system you should be able to open the manuals. ?help Q3. Not that I know of. If you have difficulty with R on Linux then you should focus on learning how to use Linux in general... and

Re: [R] about adding a column for water year

2017-07-04 Thread Jeff Newmiller
Hardly. DF$wyear is a vector, but it is being treated as though it is a scalar. Read Bert's response. -- Sent from my phone. Please excuse my brevity. On July 4, 2017 11:17:24 AM PDT, Rui Barradas wrote: >Hello, > >You have a '{' too many. > >for(i in 1972:1985){ > if(DF$year==i & DF$mon

Re: [R] expand gridded matrix to higher resolution

2017-07-05 Thread Jeff Newmiller
You probably ought to be using the raster package. See the CRAN Spatial Task View. -- Sent from my phone. Please excuse my brevity. On July 5, 2017 12:20:28 AM PDT, "Anthoni, Peter (IMK)" wrote: >Hi all, >(if me email goes out as html, than my email client don't do as told, >and I apologies al

Re: [R] Generate simulated data respecting some conditions

2017-07-06 Thread Jeff Newmiller
Yes, definitely. However, this is so close to being legal R code that I feel you have not made any effort to translate it yourself, and this is the "R-help" mailing list, not the "R-do-my-work-for-me" mailing list. Is this homework? Have you read the "Introduction to R" document that is supplie

Re: [R] Efficient swapping

2017-07-06 Thread Jeff Newmiller
No, that would remap B to A. Convert to character before doing this, then back to factors. -- Sent from my phone. Please excuse my brevity. On July 6, 2017 4:43:00 PM PDT, Ista Zahn wrote: >Untested, but I expect that setting the levels to be the same across >the >two factors > >levels(tmp$R1)

Re: [R] Histogram plots in Lattice with spatialgrid dataframe data

2017-07-09 Thread Jeff Newmiller
Glad you found an answer, though it looks more self-educational than efficient (see suggestions below). In the future, follow the recommendations of the Posting Guide: use plain text, and provide a reproducible example. Some elaborations on what "reproducible" means are [1][2][3]. One issue here

Re: [R] Help documentation of "The Studentized range Distribution"

2017-07-09 Thread Jeff Newmiller
We cannot help you understand what you are doing if you do not show us what you are doing. Here are some discussions about how to communicate questions about R [1][2][3]. [1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example [2] http://adv-r.had.co.nz/Repro

Re: [R] dplyr help

2017-07-10 Thread Jeff Newmiller
I am pretty sure that this is not a question about dplyr... it is a question about tidyr. Look at the help file ?tidyr::spread. If I understand your question (I may not, because you gave no example of input/output data), the answer is no, the column names come from the column named by the key

Re: [R] helix spring in R

2017-07-10 Thread Jeff Newmiller
This is an excellent opportunity for you to tell us why rseeek.org and Google search results did not address your needs, which may either answer your question without our help or help us to understand your needs better. I will also comment that a "spring" is usually more complex than just a "h

Re: [R] Problems with time formats when importing data using readHTMLTable

2017-07-10 Thread Jeff Newmiller
Not reproducible. [1][2][3] If our answers don't seem to apply to your situation, it will likely be because you did not explain your question clearly. Not plain text. This is a plain text mailing list, and the best-case scenario when you let your email program send HTML is that what you saw is

Re: [R] fit lognorm to cdf data

2017-07-10 Thread Jeff Newmiller
* fitdistr? * it seems unusual (to me) to fit directly to the data with lognormal... fitting a normal to the log of the data seems more in keeping with the assumptions associated with that distribution. -- Sent from my phone. Please excuse my brevity. On July 10, 2017 7:27:47 AM PDT, PIKAL Pet

Re: [R] dplyr help

2017-07-11 Thread Jeff Newmiller
. -- Sent from my phone. Please excuse my brevity. On July 11, 2017 12:56:45 AM PDT, Mangalani Peter Makananisa wrote: >Thank you very much for the support. I have just used the reshape >library and my problem was solved. > >Kind regards, > >Peter > >-Original Message---

Re: [R] submitting R scripts with command_line_arguments to PBS HPC clusters

2017-07-11 Thread Jeff Newmiller
This sounds like an operating system specific question, in that "submit the R script to a PBS HPC scheduler" would be the kind of action that would run R with very different environment variables and possibly different access credentials than your usual interactive terminal. A thorough reading

Re: [R] Efficient Binning

2017-07-14 Thread Jeff Newmiller
?cut cut( 0.51, boundaries ) You can also use as.integer to convert the resulting factor to an integer. -- Sent from my phone. Please excuse my brevity. On July 14, 2017 7:10:59 AM PDT, Dan Abner wrote: >Hi all, > >I have a situation where I have 16 bins. I generate a random number and >then

Re: [R] readLines without skipNul=TRUE causes crash

2017-07-15 Thread Jeff Newmiller
l and provide commented, minimal, self-contained, reproducible code. [[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

Re: [R] readLines without skipNul=TRUE causes crash

2017-07-15 Thread Jeff Newmiller
Devices utils datasets methods base ## ## loaded via a namespace (and not attached): ## [1] compiler_3.4.1 tools::md5sum( fn1 ) ## d:/DADOS_ENEM_2009.txt ## "83e61c96092285b60d7bf6b0dbc7072e" dat <- readLines( fn1 ) length( dat ) ## [1] 4148721 On Sat, 15 Jul 2017,

Re: [R] readLines without skipNul=TRUE causes crash

2017-07-16 Thread Jeff Newmiller
, i don't think that would reproduce the problem? i think it >needs to be the corrupted text file where R.utils::countLines( >txtfile >) gives 809367. i am able to reproduce on two distinct windows >machines >but no guarantee i'm not doing something dumb > >O

Re: [R] readLines without skipNul=TRUE causes crash

2017-07-16 Thread Jeff Newmiller
le_folder/Microdados >ENEM 2009/Dados Enem 2009/DADOS_ENEM_2009.txt >"30beb57419486108e98d42ec7a2f8b19" > > >> tools::md5sum( "S:/temp/crash.txt" ) > S:/temp/crash.txt >"30beb57419486108e98d42ec7a2f8b19" > > >

Re: [R] Arranging column data to create plots

2017-07-16 Thread Jeff Newmiller
Coord, value ) %>% filter( !is.na( X ) & !is.na( Y ) ) ) ## --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (So

Re: [R] Arranging column data to create plots

2017-07-16 Thread Jeff Newmiller
Correction at the end. On Sun, 16 Jul 2017, Jeff Newmiller wrote: On Sat, 15 Jul 2017, Michael Reed via R-help wrote: Dear All, I need some help arranging data that was imported. It would be helpful if you were to use dput to give us the sample data since you say you have already

Re: [R] readLines without skipNul=TRUE causes crash

2017-07-17 Thread Jeff Newmiller
t;; >, tf , mode = 'wb' ) >sessionInfo() >x <- readLines( tf ) > > > > >On Sun, Jul 16, 2017 at 2:22 PM, Jeff Newmiller > >wrote: > >> I am stuck. The archive package won't compile for me on Ubuntu, and >the >> CRANextra re

Re: [R] Redundancy canonical analysis plot problem in 3D using VEGAN, RGL, SCATTERPLOT3D and SFSMISC

2017-07-18 Thread Jeff Newmiller
I don't know much about what you are doing with your data, but I do know that your example is not reproducible [1][2][3]. It is very important to be clear both to yourself and to anyone you ask to help you what your data are like. Details like what the column names are, whether they are numer

Re: [R] Creating/Reading a complex string in R

2017-07-19 Thread Jeff Newmiller
I think the whole premise of this question is flawed. If you want to work with this string as data, then read it in from a separate file using readLines. If it is fixed data that you want to be part of your program, then invest the effort to escape the odd characters and be done with it. But us

<    1   2   3   4   5   6   7   8   9   10   >