Re: [R] get the value of a biplane

2017-05-29 Thread Duncan Murdoch
you set x <- bs(1:10), then type predict(x, and hit TAB, you are offered "object", "newx" and "..." as choices. On the other editors I mentioned you appear to get a list of argument names for all possible methods regardless of the class of x. Duncan murdoch __

Re: [R] get the value of a biplane

2017-05-29 Thread Duncan Murdoch
29/05/2017 2:35 AM, Jeff Newmiller wrote: Looks like it is not exported from the package namespace... a packaging error. It's not an error to rely on the generic to get to a method. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBS

Re: [R] organizing data in a matrix avoiding loop

2017-05-26 Thread Duncan Murdoch
unique(dataMatrix[,2]), unique(dataMatrix[,3])) dataArray[dataMatrix[,1:3]] <- dataTrade$FLOW # Sum across years apply(dataArray, 3, sum) I haven't tried this (you didn't give a reproducible example...), so you may need to tweak it a bit. Duncan Murdoch ___

Re: [R] Error: could not find function of a packge

2017-05-24 Thread Duncan Murdoch
getting attached fine. Any idea what is going wrong with the submission? Your help is much appreciated. Your NAMESPACE file doesn't export anything. For future reference, this is an R-devel or R-package-devel question rather than an R-help question. Please post followups

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

2017-05-21 Thread Duncan Murdoch
: you don't get auto-conversion of strings to logical/numeric values. This forces some inconsistencies between the primitive operations and explicit coercions like as.logical(), but we think that's a good thing. Duncan Murdoch On Sat, May 20, 2017 at 4:15 PM, Rolf Turner <r.tur...@auckl

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

2017-05-20 Thread Duncan Murdoch
On 20/05/2017 6:39 AM, Rolf Turner wrote: On 20/05/17 22:18, Duncan Murdoch wrote: On 20/05/2017 5:53 AM, Martin Maechler wrote: Ramnik Bansal <ramnik.ban...@gmail.com> on Sat, 20 May 2017 08:52:55 +0530 writes: > Taking this question further. > If I use a co

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

2017-05-20 Thread Duncan Murdoch
) is applied before performing the Op. Seems pretty consistent ... and also according to the principle of "least surprise" (for me at least). The surprise is that as.logical("TRUE") returns TRUE, whereas automatic coercion doesn't apply to character strings. I don'

Re: [R] Problem with choose.files(default=..., multi=FALSE)

2017-05-19 Thread Duncan Murdoch
there was no default or a short one, the two formats happened to look identical so we didn't notice this, but they differed when the default was longer than the result. Duncan Murdoch Keith Jewell On 09/05/2017 17:49, Duncan Murdoch wrote: On 09/05/2017 12:06 PM, Keith Jewell wrote: I'm very

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

2017-05-19 Thread Duncan Murdoch
this: "Logical computations treat NA as a missing TRUE/FALSE value, and so may return TRUE or FALSE if the expression does not depend on the NA operand." I'm surprised nobody on this thread has quoted that before. Duncan Murdoch __ R-help@r-p

Re: [R] plot problems

2017-05-15 Thread Duncan Murdoch
, and should be asked in one of their help forums. This mailing list is for R itself. Duncan Murdoch __ 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

Re: [R] display double dot over character in plotmath?

2017-05-15 Thread Duncan Murdoch
he default device or pdf(). The trouble with Unicode solutions is that R graphics devices aren't required to support it. Duncan Murdoch In your ggplot example, something like: ggplot(data, aes(x=X)) + geom_line(aes(y = Z), size=0.43) + xlab (expression(atop(top, bold(Age~paste(ome

Re: [R] installing caret package

2017-05-12 Thread Duncan Murdoch
ent this kind of error. (But I don't see "sigma" being used in the current source, so this may have been addressed already, or the error message may be tricking me into looking in the wrong place.) Duncan Murdoch __ R-help@r-p

Re: [R] How to plot a legend centered only on the x axis

2017-05-11 Thread Duncan Murdoch
d outside the plotting area, set "inset" and "xpd" arguments. For example, plot(1,1) legend("top", pch = 1, legend = "point", inset = -0.1, xpd = TRUE) Duncan Murdoch __ R-help@r-project.org mailing list --

Re: [R] Error: invalid type (closure) for the variable 'time' - object specific trend

2017-05-11 Thread Duncan Murdoch
me. This would need to be fixed in the package. A workaround might be to name the columns with unique names that won't be found anywhere else, e.g. name your column "NeuTime" instead of "time". Duncan Murdoch __ R-help@r-pr

Re: [R] Problem with choose.files(default=..., multi=FALSE)

2017-05-09 Thread Duncan Murdoch
when I have the pathlong default. Did you see that? (I'm in Windows 10, not the same version as you.) Duncan Murdoch When using choose.files() where: default = something multi = FALSE selected file path is shorter than the default ... then the returned value is at least as long

Re: [R] Copy and Rename Folder in same directory

2017-05-08 Thread Duncan Murdoch
oblem here, if that's not just a typo in this message. Duncan Murdoch On Mon, May 8, 2017 at 4:36 PM, Duncan Murdoch <murdoch.dun...@gmail.com <mailto:murdoch.dun...@gmail.com>> wrote: On 08/05/2017 6:59 AM, Archit Soni wrote: Hey Ben, I tried this,

Re: [R] Copy and Rename Folder in same directory

2017-05-08 Thread Duncan Murdoch
g FALSE where? Does list.of.files look right? If it contains any directories, you'll want "recursive = TRUE" in file.copy(). Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/list

Re: [R] I cannot run R.EXE or RSCRIPT.EXE

2017-05-05 Thread Duncan Murdoch
haven't told us. Duncan Murdoch __ 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

Re: [R] The effect of tolerance in all.equal()

2017-04-30 Thread Duncan Murdoch
that talk about these things, but I don't know which to recommend. Duncan Murdoch Many thanks, Ashim On Tue, Apr 25, 2017 at 3:14 PM, Martin Maechler <maech...@stat.math.ethz.ch wrote: Ashim Kapoor <ashimkap...@gmail.com> on Tue, 25 Apr 2017 14:02:18 +0530 writes: &

Re: [R] Larger rgl-images?

2017-04-28 Thread Duncan Murdoch
on it, then it might work: but I haven't come across a way to do that that also supports OpenGL in the virtual window. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] survival package can't find Ccoxfit6

2017-04-28 Thread Duncan Murdoch
On 28/04/2017 5:37 PM, Henric Winell wrote: On 2017-04-26 22:17, Duncan Murdoch wrote: On 26/04/2017 2:51 PM, Therneau, Terry M., Ph.D. wrote: A user contacted me directly about this, I answered with my best understanding of the recent R-help discussion of the issue, and their response to my

Re: [R] Error with installed.packages with R 3.4.0 on Windows

2017-04-28 Thread Duncan Murdoch
ins these pages. Thanks, I missed that update. It is now building 3.4.0-patched, so that version should be available on the mirrors in a few hours. Duncan Murdoch Best, Uwe Thank you! On Fri, Apr 28, 2017 at 7:58 AM, Uwe Ligges <lig...@statistik.tu-dortmund.de <mailto:lig..

Re: [R] Error with installed.packages with R 3.4.0 on Windows

2017-04-28 Thread Duncan Murdoch
, we might have found it earlier. Duncan Murdoch Best regards, Thierry Op 28 apr. 2017 10:36 a.m. schreef "peter dalgaard" <pda...@gmail.com>: Yes, we noticed this in the last days of the code freeze before release and shied away from inserting a workaround, partly because

Re: [R] survival package can't find Ccoxfit6

2017-04-27 Thread Duncan Murdoch
functions os is the new model going to hinder it? The new model actually helps in this. It offers the possibility that the run-time code will detect internal changes that break your code, rather than segfaulting when the argument list is wrong. Duncan Murdoch _

Re: [R] survival package can't find Ccoxfit6

2017-04-26 Thread Duncan Murdoch
written, you should copy all of it (including the Ccoxfit6 code), not just part. Or better: work with Dr. Therneau to improve it for everyone. Duncan Murdoch phcoefs(stim[ii], sts[ii], as.matrix(as.double(cvt[ii])), oo$coefficients, control) Error in phcoefs(stim[ii], sts[ii], as.matrix(

Re: [R] survival package can't find Ccoxfit6

2017-04-26 Thread Duncan Murdoch
n has never been exported from the survival package. Using unexported internals from a package is very dangerous and likely to lead to errors. (As I pointed out, there were other changes to the call besides the use of "Ccoxfit6" versus Ccoxfit6. Duncan Murdoch Thanks, Venka

Re: [R] survival package can't find Ccoxfit6

2017-04-26 Thread Duncan Murdoch
of survival saved in their workspace, and are using that one instead of the current one. - Some part of your code returns functions, and one of those is making this call based on an object produced in an earlier version of survival. - There are really two versions of survival on the search pat

Re: [R] R Date Time

2017-04-25 Thread Duncan Murdoch
derings in dates? Doesn't matter for this example, but it would for "01-02-2016T14:02:23.325" Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the po

Re: [R] R Date Time

2017-04-25 Thread Duncan Murdoch
whether you are using MDY or DMY; I used DMY): strptime("01-01-2016T14:02:23.325", format="%d-%m-%YT%H:%M:%OS") Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listi

Re: [R] Creating interactive graphs and exporting to Intranet site

2017-04-23 Thread Duncan Murdoch
using Shiny or RStudio Connect (a paid service, see https://www.rstudio.com/products/connect/), which could run on your own server. So I'd try to relax your constraints. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more

Re: [R] Looking for a package to replace xtable

2017-04-20 Thread Duncan Murdoch
le (though maybe harder to use) than xtable. I can't look at it now, but will try to remember to do so in a few hours if I don't see a better solution posted first. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more,

Re: [R] Is there a way to open R terminal running in the background

2017-04-19 Thread Duncan Murdoch
it really is the higher level thing (VBS in your case, cmd.exe if you run that at a prompt) that might have the ability to do what you want. Duncan Murdoch Thank you for your time. On Wed, Apr 19, 2017 at 12:14 PM, Duncan Murdoch <murdoch.dun...@gmail.com <mailto:murdoch.dun...@g

Re: [R] Is there a way to open R terminal running in the background

2017-04-19 Thread Duncan Murdoch
using: CreateObject("Wscript.Shell").Run R.exe CMD BATCH MyGUI.R , 0, TRUE I think this is more of a Microsoft question than anything specific to R. How do you ask VBS to show you a process that it is running? No idea where to go with VBS questions. Duncan Murdoch 2) for the

Re: [R] Fwd: Re: Setting .Rprofile for RStudio on a Windows 7 x64bit / Windows file extension hiding

2017-04-18 Thread Duncan Murdoch
page tells how to disable it there: https://support.apple.com/kb/ph19072?locale=en_US There's little point providing a link to a Microsoft page for doing this on Windows, because their help page links are not very durable. The main one that Google finds describes itself as obsolete. Dunc

Re: [R] question about the anova() function for deviance analysis

2017-04-17 Thread Duncan Murdoch
it should be code that anyone can run. Duncan Murdoch __ 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

Re: [R] what does this syntax mean in R

2017-04-16 Thread Duncan Murdoch
ent **if(TRUE){print("A"))* Because braces don't affect invisibility. Auto-printing ignores objects that are marked as invisible. You would get two lines printed if you asked for explicit printing, e.g. print( if(TRUE){print("A")} ) or remove the invisibility later, e.g.

Re: [R] I want to delete "yhat" and transpose "Response" into a vector

2017-03-29 Thread Duncan Murdoch
nspose Response into a vector Sounds like a homework assignment. We don't do those. Duncan Murdoch __ 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 htt

Re: [R] finding out if a method exists

2017-03-28 Thread Duncan Murdoch
iles finds no cmatrix, but it does find ibd::Cmatrix. So I think you're safe. Duncan Murdoch __ 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-p

Re: [R] How to load fonts in text3d?

2017-03-28 Thread Duncan Murdoch
will work on your Ubuntu version. sudo apt-get install libfreetype6-dev sudo apt-get install libftgl-dev and then reinstall rgl from within R using install.packages("rgl", type="source") Duncan Murdoch On 28/03/17 11:05, olsen wrote: thanks, the fonts seem to be on: rglF

Re: [R] How to load fonts in text3d?

2017-03-27 Thread Duncan Murdoch
sions/3.3/Resources/library/rgl/fonts/FreeSerif.ttf" [4] "/Library/Frameworks/R.framework/Versions/3.3/Resources/library/rgl/fonts/FreeSerif.ttf" If you don't have Freetype installed on your system, you won't be able to use any of those. Duncan Murdoch __

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

2017-03-26 Thread Duncan Murdoch
On 26/03/2017 1:16 PM, MyCalendar wrote: Hi R'ers: After browsing for a good package for quality table construction, I found nothing. Any advice? Try the task view on Reproducible research: <https://cran.r-project.org/web/views/ReproducibleResearch.html>. Duncan M

Re: [R] Is ImageMagick package not compatible with R 3.3.2?

2017-03-15 Thread Duncan Murdoch
. Duncan Murdoch Regards, Yihui -- https://yihui.name On Wed, Mar 15, 2017 at 12:32 AM, Bert Gunter <bgunter.4...@gmail.com> wrote: A google search on "ImageMagick Package R" brought this up, which seems relevant: https://cran.r-project.org/web/packages/magick/vignettes/int

Re: [R] "found 4 marked UTF-8 strings" during check of package... but where !

2017-03-10 Thread Duncan Murdoch
ortability in section 1.6.3 of the Writing R Extensions manual. Duncan Murdoch P.S. This question doesn't belong in R-help, it belongs in R-package-devel. If you have any followup questions, please post them there. Thanks Marc Le 10/03/2017 à 15:24, Duncan Murdoch a écrit : On 10/03/2017 2:5

Re: [R] "found 4 marked UTF-8 strings" during check of package... but where !

2017-03-10 Thread Duncan Murdoch
the check code: debug(tools:::.check_package_datasets) tools:::.check_package_datasets(pkg) where pkg contains the path to the package source code. That function does the checking one variable at a time. Duncan Murdoch __ R-help@r-project.org mailing list -

Re: [R] Alternative to ggplot2 for R version 2.15.3

2017-03-07 Thread Duncan Murdoch
also came out that month) would work with it. But the easiest thing might be to install a newer R version. You'll find very little support for 2.15.3 nowadays. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

Re: [R] Problems outputting ggplot2 graphics to pdf

2017-03-02 Thread Duncan Murdoch
w-rw-r-- 1 user group 3611 Mar 2 13:25 test.pdf This file fails to open, and always has the size 3611. Any help appreciated, ggplot2 graphics only appear when they are printed. By default source("test.R") won't print anything. Set print.eval = TRUE (or echo = TRUE) to get it to print

Re: [R] Optional arguments in stats::nls

2017-02-28 Thread Duncan Murdoch
hat the conditions are under which it will be called. I don't see a simple fix to the docs other than what I wrote above. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] R scripts attached to e-mails - correct MIME type ?!

2017-02-24 Thread Duncan Murdoch
uld be interesting to know (for me) if there are modern e-mail programs / web apps which you could *teach* about the mime type, e.g., for all files ending with extension '.R'... Well, there's Gnus in Emacs: (add-to-list 'mailcap-mime-extensions '(".R" . "text/x-rsrc")) But I gue

Re: [R] Create gif from series of png files

2017-02-14 Thread Duncan Murdoch
() function can produce an animation; see either the ImageMagick docs online, or the "intro" vignette in the magick package for examples and instructions. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more,

Re: [R] get() return nothing

2017-02-11 Thread Duncan Murdoch
; "sig.txt" "st3gal3" "st3gal3.txt" [21] "st3gal5" "st3gal5.txt" "st6gal1" "st6gal1.txt" for(i in ls(pattern="txt")){dim(get(i))} If I check individual on

Re: [R] mean of a column in a list of data frames

2017-02-05 Thread Duncan Murdoch
List, "[[", 1)) ##not working lapply returns a list of the first columns, and mean() doesn't know what to do with that. There must be a more idiomatic way to write this with map or apply. Yes, take the mean inside lapply: lapply(ownersList, function(x) mean(x[[1]])) Not tested. Duncan Murd

Re: [R] GLM HELP NEEDED!

2017-02-01 Thread Duncan Murdoch
cesario Adem�s: Warning message: In Ops.factor(y, 0) : '<' not meaningful for factors It doesn't make sense to use fractional values like 1.0488 in Poisson regression. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see ht

Re: [R] Strange display of saved functions

2017-01-30 Thread Duncan Murdoch
, by save() or readRDS()) in earlier versions of R will no longer show the original sources (including comments). Yes, indeed. Mik, if you do want the original formatting and comments, something like cat(attr(payments, "source"), sep = "\n") should display it. Duncan Mur

Re: [R] graphical behavior of a table of numbers

2017-01-29 Thread Duncan Murdoch
a vector. I think the issue is that Axis() is called without removing the class. Axis.table sets ticks based on the names of the table. Duncan Murdoch Jim On Sun, Jan 29, 2017 at 11:19 AM, Bert Gunter <bgunter.4...@gmail.com> wrote: Rich: Simpler: Just lose the "table" class. p

Re: [R] xvfb? cron job updates R packages, fails on some requiring X11

2017-01-19 Thread Duncan Murdoch
a non-X11 environment. rgl does it by checking the RGL_USE_NULL environment variable. Duncan Murdoch __ 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 ht

Re: [R] what is f_eval? It has broken the HH package

2017-01-13 Thread Duncan Murdoch
' What version of lazyeval do you have there? f_eval is exported by the current version 0.2.0, which isn't very new: it's from June, 2016. I'd try re-installing it. Duncan Murdoch I can't find f_eval lazyeval::f_eval Error: 'f_eval' is not an exported object from 'namespace:lazyeval

Re: [R] installing rgl

2017-01-11 Thread Duncan Murdoch
On 11/01/2017 3:03 PM, Weiner, Michael wrote: -Original Message- From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com] Sent: Wednesday, January 11, 2017 2:55 PM To: Weiner, Michael <wein...@ccf.org>; r-help@r-project.org Subject: Re: [R] installing rgl On this page

Re: [R] installing rgl

2017-01-11 Thread Duncan Murdoch
On this page http://forums.fedoraforum.org/showthread.php?t=294543 eventually it turned out that a similar problem was fixed by yum install libpng-devel For other readers, someone else posted that on OpenSUSE, this was the magic install: sudo zypper in libpng16-devel Duncan Murdoch On 11

Re: [R] if i paste this into my windows 3.3.2 R console, it crashes

2017-01-07 Thread Duncan Murdoch
privately and I'll create one for you (with your choice of associated email address). Duncan Murdoch Jim On Sat, Jan 7, 2017 at 8:31 PM, Anthony Damico <ajdam...@gmail.com> wrote: hi, should i file this on https://bugs.r-project.org/ ? thanks # crash R with this command dir.crea

Re: [R] [FORGED] Re: Generating a Special Histogram

2017-01-05 Thread Duncan Murdoch
On 05/01/2017 5:21 PM, Rolf Turner wrote: On 06/01/17 10:31, Jim Lemon wrote: Hi Dan, This may help if your data is in the format below: waffle.mat<-matrix(c(rep(NA,14),137,135,rep(NA,6),144,149, rep(NA,3),150,152,159,157,154, NA,163,164,164,161,162,165,164,rep(NA,5),179,173,173,

Re: [R] Generating a Special Histogram

2017-01-05 Thread Duncan Murdoch
= breaks[1]) vals <- x[keep] for (j in seq_along(vals)) { rect(breaks[i], j-1, breaks[i+1], j) text(mids[i], j-0.5, vals[j]) } } }) } x <- round(rnorm(20, mean=166, sd=4)) myhist(x) Duncan Murdoch _

Re: [R] Extracting non-matching elements of one vector from another

2016-12-31 Thread Duncan Murdoch
On 31/12/2016 1:36 PM, Dan Abner wrote: Hi all, I have 2 vectors and need to extract only the elements from v2 that do not appear in v1. What is the most efficient way to do this? In the example below, I need to extract "var1". v1<-"b0" v2<-c("b0","

Re: [R] R Statistical Application - Windows 10

2016-12-21 Thread Duncan Murdoch
do. Duncan Murdoch Best regards, Kevin McKee Consultant - TEKsystems [[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

Re: [R] Log plus one transformation in R

2016-12-13 Thread Duncan Murdoch
p, R is open source, so you could, but those are likely coming from system libraries, so it isn't easy to see how the approximations are being done. Duncan Murdoch so I need to rely on the kindness of others to explain the differences between the computations performed by the functions. I

Re: [R] Function implemented in R returns the wrong value

2016-12-11 Thread Duncan Murdoch
constructs like log(dnorm(x)) (e.g. log(phi_t0)) instead of dnorm(x, log = TRUE). The dnorm(x) value will underflow to zero, and taking the log will give you -Inf. Using the "log = TRUE" argument avoids the underflow. Duncan Murdoch rm(list=ls()) library(ssmrob) dat

Re: [R] See section 'Good practice' in '?data'.

2016-12-10 Thread Duncan Murdoch
On 10/12/2016 10:13 AM, Witold E Wolski wrote: To which document "See section 'Good practice' in '?data'." refers too? It refers to the help page for the data() function, which you see by typing ?data in the console. Duncan Murdoch Found the following calls to data

Re: [R] "Patched " version listed on CRAN mirrors is actually Oct RC version

2016-12-05 Thread Duncan Murdoch
has been released. Is there a real patched version somewhere? What URL are you using? The Windows binary at https://cloud.r-project.org/bin/windows/base/rpatched.html appears to be up to date. Duncan Murdoch David Watson NASA - MSFC Mail Code ES62 Phone 256-544-1300 FAX 256-544-2964

Re: [R] Identifying Gender

2016-12-01 Thread Duncan Murdoch
recover it from the CRAN archive and see if you can get it to build. Look for it in <https://cran.r-project.org/src/contrib/Archive>. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/m

Re: [R] browser() pre 3.1 behaviour

2016-11-23 Thread Duncan Murdoch
hen a loop is being executed (copy pasted to the R interface). This doesn't really parse for me. Could you please post detailed instructions for what you're doing and describe what you're seeing? Duncan Murdoch So I have to cancel this browser or confirm each iteration of the loop. And this

Re: [R] Help with R

2016-11-19 Thread Duncan Murdoch
You need to tell R where the "Seal_Island_Map.png" file is sitting. The "system.file(...)" call you used says it's a file in the "png" package, but it's not. The easiest way to find a file is to use the file.choose() function to open a file selection dialog, e.

Re: [R] Inconsistency of 1^NA=1 vs. 1.1^NA=NA

2016-11-17 Thread Duncan Murdoch
s only one possibility (as for example NA | TRUE gives TRUE). As far as I can see, 1 raised to any power (even infinite ones) should give 1, so the answer looks fine to me. That's not true of any of the other bases you mention (just as NA | FALSE gives NA). Dunc

Re: [R] for loop is looping only once

2016-11-17 Thread Duncan Murdoch
if length(kpis) is zero. 1:0 is a length 2 vector, not a length 0 one.) Duncan Murdoch HTH Ulrik On Thu, 17 Nov 2016 at 12:18 <g.maub...@weinwolf.de> wrote: Hi All, I need to execute a loop on variables to compute several KPIs. Unfortunately the for loop is executed only once for the la

Re: [R] Question about expression parser for "return" statement

2016-11-14 Thread Duncan Murdoch
ch in Education http://www.ecu.edu/cs-acad/aa/StemCore East Carolina University Phone: 252-737-5229 On Sun, 2016-11-13 at 13:35 -0500, Duncan Murdoch wrote: On 13/11/2016 7:58 AM, Duncan Murdoch wrote: On 13/11/2016 6:47 AM, Duncan Murdoch wrote: On 13/11/2016 12:50 AM, Dave DeBarr wrote: I've noticed tha

Re: [R] Question about expression parser for "return" statement

2016-11-14 Thread Duncan Murdoch
use return(x), but it shouldn't be used routinely. Duncan Murdoch -- Sent from my phone. Please excuse my brevity. On November 13, 2016 3:47:10 AM PST, Duncan Murdoch <murdoch.dun...@gmail.com> wrote: >On 13/11/2016 12:50 AM, Dave DeBarr wrote: >> I've noticed that if I don't inc

Re: [R] Question about expression parser for "return" statement

2016-11-13 Thread Duncan Murdoch
On 13/11/2016 7:58 AM, Duncan Murdoch wrote: On 13/11/2016 6:47 AM, Duncan Murdoch wrote: On 13/11/2016 12:50 AM, Dave DeBarr wrote: I've noticed that if I don't include parentheses around the intended return value for the "return" statement, R will assume the first parenthetical

Re: [R] Question about expression parser for "return" statement

2016-11-13 Thread Duncan Murdoch
On 13/11/2016 6:47 AM, Duncan Murdoch wrote: On 13/11/2016 12:50 AM, Dave DeBarr wrote: I've noticed that if I don't include parentheses around the intended return value for the "return" statement, R will assume the first parenthetical expression is the intended return valu

Re: [R] Question about expression parser for "return" statement

2016-11-13 Thread Duncan Murdoch
)/Variance)) Duncan Murdoch I'm guessing it is intentional; but since there is no warning about ignoring the rest of the expression, it could lead to hard-to-find bugs. Thanks, Dave Here's an example ... dnorm(2, 0, 1) normalDensityFunction = function(x, Mean, Variance) { # no parentheses s

Re: [R] Error in Summary.factor(c(24L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, :

2016-11-12 Thread Duncan Murdoch
expression experiments using maSigPro program. Who but you can run this? We don't have "blood". Duncan Murdoch des_blood=make.design.matrix(blood, degree=11) On Sat, Nov 12, 2016 at 7:54 PM, Duncan Murdoch <murdoch.dun...@gmail.com <mailto:murdoch.dun...@gmail.com>> wrote

Re: [R] value matching %in% for a number pair

2016-11-12 Thread Duncan Murdoch
), S) [1] FALSE Duncan Murdoch __ 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,

Re: [R] Error in Summary.factor(c(24L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, :

2016-11-12 Thread Duncan Murdoch
, 34L, 35L, : ‘min’ not meaningful for factors You'll need to give a minimal reproducible example (i.e. something others can run, but not containing a lot of unnecessary stuff) if you want help with this. Duncan Murdoch __ R-help@r-project.org

Re: [R] AdehabitatHR Write Spatial Polygon Problem

2016-11-08 Thread Duncan Murdoch
g to export it, but you are creating a SpatialPoints object, and the error message says something wants a SpatialPolygonsDataFrame object. So you need to convert it. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see htt

Re: [R] Pesky file encoding problem

2016-11-06 Thread Duncan Murdoch
like this: crlf <- "\r\n" outfile = "output.arp" cat('Title="data"', crlf, file=outfile, append=FALSE) cat('DataType=DNA', crlf, file=outfile, append=TRUE) etc. Duncan Murdoch __ R-help@r-project.org mailing li

Re: [R] Is this foreach behaviour correct?

2016-11-06 Thread Duncan Murdoch
quot;1970-01-01". If James is using zoo his code would be okay. If he's not, he would have got an error, so I think he must have been. Duncan Murdoch Jim On Sun, Nov 6, 2016 at 12:10 PM, James Hirschorn <james.hirsch...@hotmail.com> wrote: This seemed odd so I wanted to check: &g

Re: [R] When customizing last line, the code stops working

2016-11-03 Thread Duncan Murdoch
do.call()). Write the last line as union <- do.call(rbind, lapply(paste0("dt_sp_", 1:length(sp)), get, envir = environment())) and it works. Duncan Murdoch Thanks in advance for any help! Frank S. all.sp <- function(age.u, open, close) { require(data.table) dt <- d

Re: [R] Prevent a table from crossing page boundary using rmarkdown/pandoc

2016-11-03 Thread Duncan Murdoch
will try not to split it. You can do that by specifying the caption arg to kable(). I don't know if you can specify where the float appears or if you're stuck with the default. Duncan Murdoch In my report's context, the table is so short that breaking it across pages looks shabby, whereas

Re: [R] Using with() to avoid $ ?

2016-10-23 Thread Duncan Murdoch
. It would likely get very confused if there were two copies of them, one in one environment, one in another. So I'd advise to use one form or the other, i.e. don't use with(), or if you do, don't use data=. Duncan Murdoch Bert (But see inline below) On Oct 23, 2016 7:24 PM, "

Re: [R] read.table() question

2016-10-19 Thread Duncan Murdoch
rom those 9 observations, so there's likely something else going on further down in the file. Try which(is.na(as.numeric(as.character(rain$station to find out which lines are causing problems for that column, and similarly for rain$amount. Duncan Murdoch I expect to need to convert dates

Re: [R] rsync: failed to connect to cran.r-project.org (137.208.57.37): No route to host (113)

2016-10-19 Thread Duncan Murdoch
pretty quickly. However, it's now after office hours, so if the problem is actually in Vienna, it might not be fixed until tomorrow. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo

Re: [R] tar()/untar() argument symmetry

2016-10-18 Thread Duncan Murdoch
On 18/10/2016 12:38 PM, Roebuck,Paul L wrote: Any reason untar() has an "exdir" argument (the equivalent of "tar -C"), but tar() does not? Because you can specify the source directory in the files argument using list.files(). There's no need to duplicate that in tar

Re: [R] Difficulties with setting working directory

2016-10-15 Thread Duncan Murdoch
choose.dir()) or setwd("a/specific/directory") Duncan Murdoch __ 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-g

Re: [R] Share R.net dll without having to share R script code?

2016-10-14 Thread Duncan Murdoch
share code of the original and your modifications. Duncan Murdoch __ 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

Re: [R] can we visualize water flows with 3d in R?

2016-10-13 Thread Duncan Murdoch
na to say whether any of those figures are like what she wants to produce from her data. Duncan Murdoch Best, Tom On Thu, Oct 13, 2016 at 9:20 AM, Duncan Murdoch <murdoch.dun...@gmail.com <mailto:murdoch.dun...@gmail.com>> wrote: On 13/10/2016 8:35 AM, Thomas Adam

Re: [R] can we visualize water flows with 3d in R?

2016-10-13 Thread Duncan Murdoch
a QGIS plugin module that can do this, I believe. These software packages do facilitate representing the flow in 3D. Do you know any sample figures online that would show the type of graph that is usually used here? Duncan Murdoch Tom On Wed, Oct 12, 2016 at 6:12 PM, David Winsemius

Re: [R] Antwort: Re: Visibility of libraries called from within functions

2016-10-13 Thread Duncan Murdoch
ot loaded, the package will be loaded to make the call. So you don't need the requireNamespace call if you can be sure that xlsx will be found. You would normally use its return value (FALSE if the package is not found) to test whether it will be safe to make the xlsx::read.xlsx call. Duncan Murd

Re: [R] Visibility of libraries called from within functions

2016-10-13 Thread Duncan Murdoch
tion to get functions without putting them on the search list. For example, use xlsx::write.xlsx(data, file) If you are not sure if your user has xlsx installed, you can use requireNamespace() to check. Duncan Murdoch __ R-help@r-project.org mailing

Re: [R] barplot beside=TRUE - values differ on scales

2016-10-12 Thread Duncan Murdoch
transformation you like, not just a rescaling. If you want -2 for the 2nd row to be the same as 0 on the first row, just work out the transformation that achieves that, and use it. Duncan Murdoch thanks Adrian On Wed, Oct 12, 2016 at 12:42 PM, Duncan Murdoch <murdoch.dun...@gmail.com> wrote: >

Re: [R] barplot beside=TRUE - values differ on scales

2016-10-12 Thread Duncan Murdoch
100 units also matters in my experiment. Any help would be greatly appreciated. I would simply rescale one row and add a second axis. For example, if d holds your matrix: scale <- max(d[1,])/max(d[2,]) adjusted <- d adjusted[2,] <- scale*adjusted[2,] barplot(adjusted, bes

Re: [R] can we visualize water flows with 3d in R?

2016-10-12 Thread Duncan Murdoch
to show spheres with radius depending on the flow rate, for example plot3d(cbind(long, lat, depth), type="s", col="blue", radius=flow/5) Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://

Re: [R] Opening or activating a URL to access data, alternative to browseURL

2016-10-11 Thread Duncan Murdoch
the other day. What went wrong for you? Duncan Murdoch #1 browseURL('http://pick18.discoverlife.org/mp/20m?plot=2=Hypoprepia+fucosa=33.9+-83.3=2011,2012,2013=build_txt: <http://pick18.discoverlife.org/mp/20m?plot=2=Hypoprepia+fucosa=33.9+-83.3=2011,2012,2013=build_txt:>') # This opens t

Re: [R] bquote in list to be used with do.plot()

2016-10-08 Thread Duncan Murdoch
Any solution? (I tries also with substitute() and expression() but I fail also) This seems to work: L <- list(x=1, y=1, ylab=bquote(expression(.(format(scaleY), scientific=FALSE)^"-1"))) do.call(plot, L) Duncan Murdoch __ R-help@r-pro

<    3   4   5   6   7   8   9   10   11   12   >