Re: [R] smoothScatter() and the KernSmooth package

2020-06-19 Thread Jeffrey Dick
Hi Witold, See also this thread on R-pkg-devel. Quoting Duncan Murdoch, "That looks like a bug in grDevices." https://stat.ethz.ch/pipermail/r-package-devel/2019q3/004287.html Cheers, Jeff On Wed, Jun 17, 2020 at 4:59 PM Witold E Wolski wrote: > > Hello, > > I am getting the following error

Re: [R] Grap Element from Web Page

2013-08-15 Thread Jeffrey Dick
[@rel='alternate'] ) Error in UseMethod(xpathApply) : no applicable method for 'xpathApply' applied to an object of class character Guidance would be much appreciated. --JJS On Wed, August 14, 2013 4:19 am, Jeffrey Dick wrote: Hi, There are many occurrences of the CIK number

Re: [R] Grap Element from Web Page

2013-08-14 Thread Jeffrey Dick
Hi, There are many occurrences of the CIK number in the page source. This pulls out the first node containing it: node - getNodeSet(doc[[1]], //link[@rel='alternate'] ) From there you can extract the number. Here's one way to do it. strsplit(strsplit(unlist(node)[[5]], CIK=)[[1]][2],

Re: [R] permutation of vectors (1 or 0)

2012-12-20 Thread Jeffrey Dick
you might also try (names modified a bit since R already has a NULL object) Zeros - rep(0,10) Ones - rep(1,10) expand.grid(Map(c, Zeros, Ones)) On Thu, Dec 20, 2012 at 9:24 PM, Olga Lyashevska o...@herenstraat.nl wrote: On 12/20/2012 02:13 PM, arun wrote: library(gtools)

Re: [R] troubles reading a text file

2012-12-15 Thread Jeffrey Dick
Hi Igor, It appears that the encoding is UTF-16. readLines(temp-mon.txt) [1] þÿ [14] A search for þÿ leads to the Wikipedia page http://en.wikipedia.org/wiki/Byte_order_mark, specifically

Re: [R] Use dump or write? or what?

2011-08-01 Thread Jeffrey Dick
Hi Matt, I assume that you want a tabular text file of the results. Since I don't know what your tempA and tempB are I'll steal some examples from ?t.test t.example.1 - t.test(1:10,y=c(7:20)) t.example.2 - t.test(1:10,y=c(7:20, 200)) Now looking at ?dump, the first argument needs to be

Re: [R] How to count numbers of a vector and use them as index values?

2011-07-31 Thread Jeffrey Dick
Here's an attempt using sapply: x - c(2, 2, 3, 3, 4, 6) ys - 1:8 sapply(ys, function(y) { length(which(x==y)) } ) [1] 0 2 2 1 0 1 0 0 Jeff On Sun, Jul 31, 2011 at 2:41 PM, Paul Menzel paulepan...@users.sourceforge.net wrote: Dear R folks, I am sorry to ask this simple question, but my

Re: [R] group length

2011-05-12 Thread Jeffrey Dick
On Thu, May 12, 2011 at 10:00 AM, Ledon, Alain alain.le...@ally.com wrote: sapply... y1=c(1.214,1.180,1.199) y2=c(1.614,1.710,1.867,1.479) y3=c(1.361,1.270,1.375,1.299) y4=c(1.459,1.335) sapply(list(y1,y2,y3,y4), length) [1] 3 4 4 2 Or, if you don't want to name each object individually:

[R] [R-pkgs] New package: CHNOSZ

2009-04-27 Thread Jeffrey Dick
Dear R users, A new package, CHNOSZ (version 0.8), is available on CRAN. CHNOSZ is a package for thermodynamic calculations and analysis. Functions are available for calculating the standard Gibbs energies and other thermodynamic properties, and chemical affinities, of reactions between