Re: [R] AR1 model using ARIMA

2016-06-14 Thread Duncan Murdoch
On 14/06/2016 7:46 AM, T.Riedle wrote: Dear R users, I have not received any help regarding my problem. Please read the posting guide (see the link at the bottom of every message). If you don't post reproducible code, it's much harder to help you. Duncan Murdoch The rolling

Re: [R] messy code found when reading CSV file on win 10 system

2016-06-15 Thread Duncan Murdoch
ll. What you should do: Start R without RStudio, e.g. using Rgui. See if the problem persists. If so, post the details here. If not, move over to the RStudio help forums. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and

Re: [R] better loop for simulation

2016-06-18 Thread Duncan Murdoch
On 18/06/2016 6:12 PM, Naresh Gurbuxani wrote: I want to calculate a function many times over. My solution below works, but does not seem very elegant. # my function to run many times over stud.score <- function(n.questions, mult.choice = 2) { prob.success <- 1 / mult.choice an

Re: [R] About the parameters of rotationMatrix

2016-06-21 Thread Duncan Murdoch
print(UserMatrix) } You are rotating by a constant amount about a sequence of parallel vectors. Only the length of the vectors is changing. If you want to see a change, you need to use a different rotation axis, or a different amount of rotation. Duncan Mu

Re: [R] check broken links in a column

2016-06-21 Thread Duncan Murdoch
, length(urls)) for (i in seq_along(urls)) { if (inherits(try(readLines(urls[i], 1), silent = TRUE), "try-error")) result[i] <- FALSE else result[i] <- TRUE } You can put together something more sophisticated with tryCatch(), which would make it easier to catch

Re: [R] rgl and rglwidget: Weird behaviour than animating lines

2016-06-23 Thread Duncan Murdoch
Studio (or other front ends) and they'll generally work more or less the same as they do in a Markdown document. However, when I try to do that with this one, it fails, because you use r1 without defining it. You might want to think about deleting everything unnecessary a

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

2016-06-27 Thread Duncan Murdoch
ntries, if row or column contains more than one value). Duncan Murdoch Kind regards Georg Von:PIKAL Petr An: "g.maub...@weinwolf.de" , Kopie: "r-help@r-project.org" Datum: 27.06.2016 11:03 Betreff:RE: [R] Antwort: Fw: Re: Subscripting problem w

Re: [R] object 'add.expr' not found

2016-06-27 Thread Duncan Murdoch
okay. If not, you'll need to find what other function is using add.expr; there are no other base functions that use it. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo

Re: [R] How to create these variables in R?

2016-06-28 Thread Duncan Murdoch
just use a loop. Your rules are a little ambiguous (are 0 and 1 the only possible values?) so I won't try, but it should be straightforward for you to write the loop. A2 and A3 are easy: A2 <- as.numeric(A1 %in% 1:2) A3 <- as.numeric(A1 > 2) Duncan Murdoch See the example be

Re: [R] (sin asunto)

2016-06-28 Thread Duncan Murdoch
On 28/06/2016 5:46 AM, Monse Buenaño wrote: Excuse me, I want to change my e-mail adress, where I receive your e-mails. Can you help me? Follow the link below: R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help Duncan Murdoch

Re: [R] termplot intervals - SE or CI?

2016-06-28 Thread Duncan Murdoch
t's a rough 95% confidence interval, is that right? I would assume they are what the help file says, but if I wasn't sure, I'd work them out for a simple case from first principles, and compare to what the code gives. Duncan Murdoch Many thanks, Eric Goodwin Scientific data a

Re: [R] Installing from source on Windows 7: tibble

2016-06-29 Thread Duncan Murdoch
9.3/mingw_64/bin/ and in C:\R-Project\R-3.3.0\etc\i386\Makeconf you want BINPREF ?= c:/R-project/Rtools/gcc-4.9.3/mingw_32/bin/ You need to make sure you don't have an environment variable named BINPREF defined, or it will override these settings. (If you were building just one architecture

Re: [R] Antwort: Re: Installing from source on Windows 7: tibble

2016-06-29 Thread Duncan Murdoch
1 Warning in install.packages : installation of package ‘tibble’ had non-zero exit status -- cut -- What else could I do? You seem to have missed the second part of my advice, describing what to do with the two Makeconf files. Duncan Murdoch Kind regards Georg Von:Duncan Mu

Re: [R] Antwort: Re: Antwort: Re: Installing from source on Windows 7: tibble [SOLVED]

2016-06-29 Thread Duncan Murdoch
mingw_64" directly in "C:\R-Project\Rtools\"? gcc-4.6.3 was installed that way. The 4.6.3 compiler was compiled for "multilib" operation: the same compiler took command line options to distinguish between 32 bit and 64 bit compiles. The newer version doesn't support

Re: [R] linking vignettes in a man page

2016-06-29 Thread Duncan Murdoch
/ in a package can be viewed You can give \url{} style links, for example the grid package has \url{../doc/grid.pdf} in the package?grid help topic. Similarly, ../..//help/ will link from a vignette to help topic ?alias. Duncan Murdoch __ R-help

Re: [R] Antwort: Re: Antwort: Re: Antwort: Re: Installing from source on Windows 7: tibble [RE OPENED]

2016-06-30 Thread Duncan Murdoch
se that, the Makefiles in R (or in your package, if you have one) chooses. The COMPILED_BY definition is not involved in that decision. Duncan Murdoch Kind regards Georg Von:Duncan Murdoch An: g.maub...@weinwolf.de, Kopie: r-help@r-project.org Datum: 29.06.2016 17:34 Betref

Re: [R] Problem with utils package

2016-07-04 Thread Duncan Murdoch
are you determining that? Are you using packageVersion("utils")? The version of a base package should always match the version of R, so if you've really got 3.0.2 there, something is seriously wrong. Duncan Murdoch On an older version of R (3.1.2) which I am running on a Windo

Re: [R] Sweave vs. R CMD Rd2pdf --no-clean --force

2016-07-04 Thread Duncan Murdoch
t. sessionInfo() R version 3.2.1 (2015-06-18) That's not the latest version. Duncan Murdoch Platform: x86_64-apple-darwin10.8.0 (64-bit) Running under: OS X 10.7.5 (Lion) locale: [1] C attached base packages: [1] tools stats4splines parallel datasets [6] compiler grap

Re: [R] BCa Bootstrapped regression coefficients from lmrob function not working

2016-07-06 Thread Duncan Murdoch
set of fixed locations. Duncan Murdoch Best S - Mail original - De : peter dalgaard À : varin sacha Cc : Bert Gunter ; R-help Mailing List Envoyé le : Mercredi 6 juillet 2016 11h05 Objet : Re: [R] BCa Bootstrapped regression coefficients from lmrob function not working Offhand, I

Re: [R] Please help: cannot import files from Windows into R

2016-07-14 Thread Duncan Murdoch
ers\Christa Rose\Desktop\Ran_mine_play_data.txt Can someone help me resolve this?? How did you produce the file Ran_mine_play_data.txt? If you saved it from Word, you need to tell it to save in plain Ascii format. I don't have a copy of Word to look at, so I can't tell you how that is

Re: [R] Matrix

2016-07-16 Thread Duncan Murdoch
; > Desired output > A A 3 > A B 4 > A C 5 > B B 7 > B C 8 > C C 9 Yes, use matrix indexing. I don't think the 3600 values are going to be very easy to read, but here's how to produce them: m <- matrix(1:3600, 60, 60) indices <- expand.grid(row = 1:60, c

Re: [R] writing a matrix to a file with trailing zeroes

2016-07-17 Thread Duncan Murdoch
.4 5.0 -0.9 -1.1 -1.0 -0.1 -0.4 1.2 -0.8 1.3 6.0 2.5 write(round(t(x2),1),file="") -1.4 5 -0.9 -1.1 -1 -0.1 -0.4 1.2 -0.8 1.3 6 2.5 write(round(t(x2),1),file="",ncol=2) -1.4 5 -0.9 -1.1 -1 -0.1 -0.4 1.2 -0.8 1.3 6 2.5 Still no luck. I need the 5 in the first line to be

Re: [R] findAssocs in TM package in R help?

2016-07-17 Thread Duncan Murdoch
uctor for help. Duncan Murdoch Now I need to run findAssocs from my dtm with some word say 'like' with a correlation of 0.70 but as far as i have been researching it tells it this function is only viable when we have more than 1 doc however in my case i only have 1. So please suggest

Re: [R] findAssocs in TM package in R help?

2016-07-18 Thread Duncan Murdoch
o me. But some assignments aren't homework. Duncan Murdoch On Mon, Jul 18, 2016 at 5:09 AM, Duncan Murdoch mailto:murdoch.dun...@gmail.com>> wrote: On 17/07/2016 6:31 PM, Shivi Bhatia wrote: Hi Team, Please suggest. On Sun, Jul 17, 2016 at

Re: [R] Build command in library(devtools)

2016-07-20 Thread Duncan Murdoch
used to build current R (and all of its packages), so of course it works there (though we may not have tested on the latest version of Windows, and devtools is its own project, unrelated to Rtools). Duncan Murdoch On 7/19/2016 4:38 PM, John McKown wrote: On Tue, Jul 19, 2016 at 3:15 PM, Steven

Re: [R] Help installing Rcmdr on Mac

2016-07-21 Thread Duncan Murdoch
-5.tgz' Content type 'application/x-gzip' length 5456133 bytes (5.2 MB) == downloaded 5.2 MB That part was fine. Duncan Murdoch ? If someone could please help me, I would be very grateful. It is quite urgent! Many thanks in advance

Re: [R] Soft Question: Where to find this reference.

2016-07-25 Thread Duncan Murdoch
azon. Google Books can give details. The ISBN is 0534167640. 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/pos

Re: [R] Date Time in R

2016-07-26 Thread Duncan Murdoch
cter(eir$date), "%m-%d-%y") If that doesn't work, you'll need to post something reproducible. Duncan Murdoch I also need to create weekdays from this date variable but until i get this resolved i cant find a weekday. For weekday i have used: eir$week<- (eir$date) eir$week<-

Re: [R] Visualization of a Convex Hull in R (Possibly with RGL)

2016-07-26 Thread Duncan Murdoch
eas would be welcome. The convex hull of a set of spheres isn't a polyhedron (parts of the spheres will appear in it, and it will have curved edges). Shapes like that are hard to draw in rgl. Duncan Murdoch __ R-help@r-project.org mailing li

Re: [R] SegFault when trying to install an inhouse package

2016-07-28 Thread Duncan Murdoch
ump to an invalid memory address). You can avoid the rgl.init problems by setting the environment variable RGL_USE_NULL to TRUE before running anything. That should help on your 3.2.3 servers. It's possible that the segfault on the other system is related, but I'd guess it's s

Re: [R] type of objects in last session

2016-08-01 Thread Duncan Murdoch
ticed everything is type "character". Obviously wrong answer. So How can I have the right answer ? Thanks The ls.str() function probably does what you want. If you wanted to do it with sapply (e.g. because you want just typeof(), not everything else), you need to take account of the fac

Re: [R] Read output:

2016-08-02 Thread Duncan Murdoch
#x27;t exist. It's got a long name, so you may have made an error typing it. I recommend using f <- file.choose() to put the correct filename into f, then read.csv(f, header = TRUE) to read it. Duncan Murdoch __ R-help@r-project.org mail

Re: [R] Multiple plot in a page

2016-08-03 Thread Duncan Murdoch
blem there.) Just drop it. Duncan Murdoch On Wed, Aug 3, 2016 at 4:55 PM, Jim Lemon wrote: Hi Roslina, You only specify space for two plots in: par(mfrow=c(1,2)) However, you only try to plot two plots, so I will assume that you only want two. You haven't defined "x" in the abo

Re: [R] Fwd: only plot borders of a region in a scatter plot

2016-08-04 Thread Duncan Murdoch
On 04/08/2016 11:03 AM, William Dunlap via R-help wrote: If 'basinID' is the matrix of basin identifiers you could draw an outline of the basin with identifier 'ID' with coutour( basiinID == ID, level=0.5) Note the typo: that should be contour( basiinID == ID, level=

Re: [R] Fwd: only plot borders of a region in a scatter plot

2016-08-04 Thread Duncan Murdoch
nks a lot :P The second problem is easy: just change your NA values to some new ID value, or change the test from basiinID == ID to !is.na(basiinID) & basiinID == ID The first one looks harder. Duncan Murdoch Cheers, Zun Yin On Thu, Aug 4, 2016 at 5:09 PM, Bert Gunter wrote: ...

Re: [R] RGL library loading issues

2016-08-05 Thread Duncan Murdoch
of MacOS; I don't do any testing on those versions any more. Did you install from source? Which version of rgl did you install? Duncan Murdoch library(rgl) ^C ^D Finally I had to kill -1 . what could be the issue? appreciate your help. Thanks Adrian X window systemm X quartz 2.

Re: [R] BaseX

2016-08-09 Thread Duncan Murdoch
quite striking that all "digits" are 12 or less -- I suspected an error at first. But it's right: sum(c(4, 12, 9, 2)*62^(3:0)) is 1e6. Duncan Murdoch On Tue, Aug 9, 2016 at 10:42 AM, wrote: > Hello, > > As for base 58 or base 62 I don't know, but for b

Re: [R] Continuation-parsing / trampoline / infinite recursion problem

2016-08-10 Thread Duncan Murdoch
ue can change between the time you make the thunk and the time you evaluate it. I think you could force the evaluation within make_thunk by changing it to make_thunk <- function(f, ...) { list(...); function() f(…) } and then would be able to skip the force() in you

Re: [R] Continuation-parsing / trampoline / infinite recursion problem

2016-08-10 Thread Duncan Murdoch
} because that forces evaluation of both arguments. I suspect you would have problems with make_thunk <- function(f, ...) function() do.call(f, list(...)) for exactly the same reasons as the original; I'm surprised that you found it appears to work. Duncan Murdoch Thanks a lot!

Re: [R] Continuation-parsing / trampoline / infinite recursion problem

2016-08-10 Thread Duncan Murdoch
the function thunklist[[2]] (or something else if i has been modified in the meantime), and things will go bad. That's why it's important to force both f and ... in make_thunk. Duncan Murdoch thunk_factorial <- function(n, continuation = identity) { if (n == 1) {

Re: [R] Continuation-parsing / trampoline / infinite recursion problem

2016-08-11 Thread Duncan Murdoch
On 10/08/2016 1:28 PM, Duncan Murdoch wrote: On 10/08/2016 1:10 PM, Thomas Mailund wrote: That did the trick! I was so focused on not evaluating the continuation that I completely forgot that the thunk could hold an unevaluated value… now it seems to be working for all the various

Re: [R] Help with non standard evaluation and require function

2016-08-12 Thread Duncan Murdoch
for the install.packages call. You should have been able to figure this out from the ?require help page. It is mentioned twice, and is used in one of the examples. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, s

Re: [R] R Studio: Run script upon saving or exiting

2016-08-13 Thread Duncan Murdoch
to do that. 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, self

Re: [R] Help with non standard evaluation and require function

2016-08-14 Thread Duncan Murdoch
same once it is evaluated). Peter gave an example where they differ, here's another: > f(1+2) x + (1 + 2) Duncan Murdoch It is probaby a very trivial problem but I find hard to figure out ho substitute works. Thanks a lot again for the help! Cheers, Luca On Aug 12, 2016 20:14, &quo

Re: [R] How to set the window size in rgl for full hd resolution

2016-08-17 Thread Duncan Murdoch
() 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, self-contained

Re: [R] Retrieving data from survey in R Studio

2016-08-18 Thread Duncan Murdoch
Sorry, we don't do homework on this list. You should ask your instructor. Duncan Murdoch On 18/08/2016 5:19 AM, Barathan Roy Pinas wrote: Hello, I have been given a .csv file and it is not loading. This is what I did. survey=read.csv("http://www.maths.usyd.edu.au/u/UG/IM/

Re: [R] persp fail with non-equidistant dates

2016-08-22 Thread Duncan Murdoch
uments, and a matrix of values in the third. Using your variable names, you'd want z[i,j] to correspond to y[i] and x[j]. If you just have a collection of (y, x, z) triples, you'll need to do some pre-processing to fit a surface and produce the required inputs. Duncan Murdoch __

Re: [R] persp fail with non-equidistant dates

2016-08-22 Thread Duncan Murdoch
a reproducible example for others to try. You might want to select a subset of your data if it's too big or too private to post here. Duncan Murdoch Thanks, Tomas Bayer On 22/08/2016 11:17 AM, Tomas Bayer wrote: Hello, when I plotted non-equidistant data in 3D (using persp and con

Re: [R] Leaflet package error while adding Polygons

2016-08-27 Thread Duncan Murdoch
ML is also a recommendation of the posting guide (see the footer for the URL). Duncan Murdoch Thanks, Jaya ​ [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/ma

Re: [R] How to test existence of an environment and how to remove it (from within functions)?

2016-08-29 Thread Duncan Murdoch
ment rather than purely locally within the evaluation frame of the call. You need to create the variable "persistent" there, or the assignment would go to the global environment, which is bad. This gives > aux(1) > aux(2) Previous arg was 1 > aux(3) Previous arg was 2 Duncan

Re: [R] possible error in stem() function?

2016-08-29 Thread Duncan Murdoch
happen in that the 480's do precede the 490's. Duncan Murdoch If I remove one value from the input, then the result appears correct: x <- c(479,482,487,493,494,494,495,496,497,498,498,499,503,504,507,507,508, + 510,511,512,514,516,520,524,525,525,

Re: [R] How to test existence of an environment and how to remove it (from within functions)?

2016-08-29 Thread Duncan Murdoch
denly it will magically remember previously calculated values. There are ways to get old values to timeout automatically, etc. Duncan Murdoch x.cols <- get("cached.obj", .my_environ) } else { # time-consuming part (+ cache) x.cols <- s

Re: [R] source() does not include added code

2016-08-31 Thread Duncan Murdoch
not? You're missing a closing parenthesis. I'd have hoped for an error message about that, and I get one with a similar example. Not sure why you didn't. > source('test.R') Error in source("test.R") : test.R:4:0: unexpected end of input 2: message("

Re: [R] readBin documentation error

2016-09-03 Thread Duncan Murdoch
ot;character"' unless it happens to contain one of those strings), so this is a way to allow a common readable abbreviation. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/ma

Re: [R] R-specific Software Requirement Specification

2016-09-07 Thread Duncan Murdoch
mplate for such work. The Rd help pages do some of this. They aren't so good at describing the class hierarchy but are good at specifying individual functions. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and

Re: [R] R-specific Software Requirement Specification

2016-09-08 Thread Duncan Murdoch
may accidentally edit the Roxygen comments at the same time. It's more work for Harold to notice that his spec has been changed than if it is in a separate file. Duncan Murdoch Create a package, put it on github, and away you go. On 9/8/2016 9:53 AM, Doran, Harold wrote: Then from

Re: [R] with and evaluation

2016-09-08 Thread Duncan Murdoch
and thus have no idea how to use it. I guess computerese is analogous to taxlawese. Familiar words have entirely different meanings. Carl Sutton CPA [[alternative HTML version deleted]] This is really hard to read, because you posted in HTML. If you don't get a useful answer, please try

Re: [R] More tube-like lines3D?

2016-09-13 Thread Duncan Murdoch
of them, things will slow down noticeably. 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

Re: [R] why data.frame, mutate package and not lists

2016-09-14 Thread Duncan Murdoch
ame, but when I reflect on the typical way a seasoned R programmer approaches list and data.frames that is basically what they are communicating. I believe it is intended to be a requirement. You can construct things with class "data.frame" that don't have that structure, but lot

Re: [R] NaN Log-lik value in EM algorithm (fitting Gamma mixture model)

2016-09-14 Thread Duncan Murdoch
log likelihoods is that rounding error gives you a negative likelihood, and then log(lik) comes out to NaN. You just need to look really closely at each step of your calculations. Avoid using log(); use the functions that build it in (e.g. instead of log(dnorm(x)), use dnorm(x, log =

Re: [R] separate commands by semicolon

2016-09-19 Thread Duncan Murdoch
mportant (I am trying to simulate a normal R console), and parse only if it syntactically correct. I was merely curious if this could be done, likely using regular expressions (surely strsplit doesn't solve it). Best, Adrian See the section on "partial parsing" in the ?parse help p

Re: [R] `head` doesn't show all columns for an empty data.frame

2016-09-22 Thread Duncan Murdoch
Address Sun.Hrs Mon.Hrs <0 rows> (or 0-length row.names) If you do that, head() works: > head(test) [1] CodeNameAddress Sun.Hrs Mon.Hrs <0 rows> (or 0-length row.names) So this is a bug in openxlsx. It's also a well-known limitation of the S3 object syst

Re: [R] R freezing issue when checking to see if variable belongs to two different vectors

2016-09-23 Thread Duncan Murdoch
each user manually. But at least we only need to do that once per user.) If you can't make this happen reproducibly, it probably won't get investigated. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://

Re: [R] curve() doesn't seem to use the whole range of x? And Error: longer object length is not a multiple of shorter object length

2016-09-25 Thread Duncan Murdoch
ors. If you actually want to plot line segments using your original data, use lines(). (You'll likely need to sort your x values into increasing order if you do that, or you'll get a pretty ugly plot.) Duncan Murdoch On 25 Sep 2016, at 16:01, Matti Viljamaa wrote: I’m trying to plo

Re: [R] How to add overall xlabel and ylabel?

2016-09-25 Thread Duncan Murdoch
use mtext(..., outer = TRUE). 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] 32 and 64 bit R

2016-09-26 Thread Duncan Murdoch
choose to break that. 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

Re: [R] using read.csv2()

2016-09-29 Thread Duncan Murdoch
e you what you want, or you can convert after the fact with as.numeric(as.character(don$var3)) Duncan Murdoch Thanks a lot for your answer. With my best regards, Pascale Voirin [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] Closed list?

2016-09-29 Thread Duncan Murdoch
subject "[R] Architect from Open Analytics" on Sept 10. No responses to it; I guess nobody else uses that package. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-h

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

2016-09-29 Thread Duncan Murdoch
first page, wait a bit, then read the second one. If you need to manage cookies, you'll need something more complicated. I don't know the easiest way to do that. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, s

Re: [R] Are '1st decimal' R rollouts (e.g. 3.2.0) qualitatively different?

2015-04-17 Thread Duncan Murdoch
lot of new bugs, and you may well be better off from a reliability point of view using it instead of 3.1.3. This isn't always true, so you should pay attention to the news about changes in the new version, and make your decision based on your own circumstances. Duncan Murdoch

Re: [R] Need online version of R help pages

2015-04-17 Thread Duncan Murdoch
-tests. Don't use it. Duncan Murdoch Consquently, I've been relying on Google, but it is often not > clear how directly relevant the info is for the specific command that > I'm using. For example, reshape is complicated, and has more than 1 > version. > > Is ther

Re: [R] select portion of text file using R

2015-04-20 Thread Duncan Murdoch
you don't know the values for those arguments, you can use readLines() to read the entire file, then use grep() to recognize your table data, and either re-read the file, or just extract those lines and read from them as a textConnection. Duncan Murdoch > Many thanks > regards > Lui

Re: [R] RODBC package not found (in English)

2015-04-20 Thread Duncan Murdoch
n install.packages("RODBC") first. Depending on which platform you're working on, this might fail; in that case, you'll need to give us more details. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more,

Re: [R] regexpr - ignore all special characters and punctuation in a string

2015-04-20 Thread Duncan Murdoch
;today" and "to day" to be different, e.g. clean <- function(s) { s <- gsub("[[:punct:]]", "", s) gsub("[[:blank:]]+", " ", s) } which converts multiple blanks into single spaces. Duncan Murdoch _

Re: [R] select portion of text file using R

2015-04-27 Thread Duncan Murdoch
1:17281 ... i.e. here. If you don't have row names in the file, there's no need to specify them numerically: that would be the default. So I'd drop *both* cases where you give the row.names argument. Also, I may have counted wrong, but it looks to me that the line with the column h

Re: [R] invalid function value in 'nlm' optimizer

2015-04-28 Thread Duncan Murdoch
ry, and apply a penalty according to how far you moved it. Or just take the absolute value of the parameter. Or reparametrize so that illegal values aren't possible. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and mor

Re: [R] R 3.2.0 for Windows: error installing local zip packages using repos=NULL

2015-04-28 Thread Duncan Murdoch
"bpca_1.2-2.zip", repos = NULL) : > type == "both" cannot be used with 'repos = NULL' > > Is it a bug? The default for "type" has changed to "both", but it doesn't work with repos=NULL. You need to specify type="binary".

Re: [R] Limiting state probability for Markov chain

2015-04-28 Thread Duncan Murdoch
limit, rounding may mean those two vectors are not equal. You can do an approximate test using the all.equal() function; see the help page ?all.equal for how to use it in an if() statement. Duncan Murdoch > 2: In if (b %*% x == b) { : > the condition has length > 1 and only the first elem

Re: [R] package.skeleton warning

2015-04-28 Thread Duncan Murdoch
e saying that your code is in a file called "~/Desktop/myPkg/R/" but you have no such file. If you really do have your code already in some files, list them in the code_files argument, otherwise leave it blank. Duncan Murdoch __ R-help@r-proje

Re: [R] reverse dep of a package

2015-04-28 Thread Duncan Murdoch
ncy". The standard definition is that if B depends on A, then A is a dependency of B, and B is a reverse dependency of A. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] cite publications in the package help file

2015-04-28 Thread Duncan Murdoch
is > specified in inst/citation. The package help file (e.g. foo-package.Rd for package "foo") will be displayed first in the PDF, and is the first entry linked in the help page index for the package. I don't know what page you mean as the &qu

Re: [R] reverse dep of a package

2015-04-28 Thread Duncan Murdoch
On 28/04/2015 1:04 PM, carol white wrote: > yes, reverse dependency. All the reverse dependancies on the main web > page of the packages are generated by CRAN? Yes. Duncan Murdoch > > Thanks > > > > On Tuesday, April 28, 2015 5:02 PM, Duncan Murdoch > wrote: &g

Re: [R] cite publications in the package help file

2015-04-28 Thread Duncan Murdoch
sentence like "See the 'foo' vignette for related references." seems reasonable. (Or you could refer to the reference manual, or a help page, etc.) Duncan Murdoch > > > > On Tuesday, April 28, 2015 7:37 PM, Duncan Murdoch > wrote: > > > On

Re: [R] package.skeleton warning

2015-04-29 Thread Duncan Murdoch
g package. So in answer to your question: package.skeleton won't do anything with your inst or vignette directories. You'll need to copy those into the new package yourself. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIB

Re: [R] invalid function value in 'nlm' optimizer

2015-04-29 Thread Duncan Murdoch
On 29/04/2015 9:49 AM, Hanze Zhang wrote: How should I do? The issue happened on log likelihood function? I imagine it's the log(x[delta==1]) term that is turning the result into a vector. Duncan Murdoch On Tue, Apr 28, 2015 at 11:06 PM, William Dunlap <mailto:wdun...@tibco.com

Re: [R] 'Installation of package had non-zero exit status' on R-3.2.0 (RStudio Version 0.98.1103) on Ubuntu 12.04 OS

2015-04-30 Thread Duncan Murdoch
is on your path, and you should get past that error, and on to the next one. Duncan Murdoch *> install.packages("swirl")* Installing package into ‘/home/anirudh/R/x86_64-pc-linux-gnu-library/3.2’ (as ‘lib’ is unspecified) also installing the dependencies ‘testthat’, ‘httr’, ‘yaml

Re: [R] 'Installation of package had non-zero exit status' on R-3.2.0 (RStudio Version 0.98.1103) on Ubuntu 12.04 OS

2015-04-30 Thread Duncan Murdoch
issing, has been obsoleted, or > is only available from another source That sounds like a problem you'll need to ask about on an Ubuntu forum, not R-help. Once you get the library installed so that the curl-config command works for you (outsid

Re: [R] update.packages() ask for mirror several times

2015-05-05 Thread Duncan Murdoch
> updated packages. It is only a minor annoyance, was wondering if anyone else > had experienced this, and if so, is there a solution You could try R-patched. This was fixed this week. Duncan Murdoch > Here is my session info > >> sessionInfo() > R version 3.2.0 (2015

Re: [R] does segfault mean (always) a bug?

2015-05-05 Thread Duncan Murdoch
is in the best position to track it down further. If you can simplify the code to trigger it without using any contributed packages, then it could well be a bug in R, and we'd like to see code to reproduce it. Duncan Murdoch __ R-help@r-project.org

Re: [R] Package Build Recommendations

2015-05-06 Thread Duncan Murdoch
t choose a name that conflicts with a standard one.) On installation, it will be copied up a level, and the system.file() function will be able to find it. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https

Re: [R] order by which the eigenvalues are presented

2015-05-06 Thread Duncan Murdoch
f_1 > independently of the sampled values of a11,a12...,a33? I don't know the answer, but I would expect it to depend on the entries in the matrix in quite a complicated way. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIB

Re: [R] tables package: localization of "All" subtotals label

2015-05-15 Thread Duncan Murdoch
0.44 If you want to change the labels used for each level of the Species variable, you would use the "levelnames" argument to Factor() or one of the related functions. Duncan Murdoch > > Error in e[[3]] : subscript out of bounds > > > > Thanks! > >

Re: [R] tables package: localization of "All" subtotals label

2015-05-15 Thread Duncan Murdoch
ly getting the tools to install a translation. Error message translations could also be included.) 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

Re: [R] Illustrating use of R package

2015-05-17 Thread Duncan Murdoch
a windows machine to build the windows binary for > CRAN? You don't need to make a Windows binary at all, except for local testing. You only need to make the tarball, and CRAN will build the binary. However, testing is important. You should

Re: [R] Subset and 0 replace?

2015-05-20 Thread Duncan Murdoch
with that name in the doBy package; is that the one you're using? You doing say how to do the grouping, and I can't read your code to figure it out, but this code will do what you want with suitable inputs: by(df, group, function(subset) wit

Re: [R] Question regarding different R versions on an enterprise network server

2015-05-21 Thread Duncan Murdoch
me app name (i.e., what folders to go to, etc.) If you are doing the install, you can rename Rgui.exe to something else, e.g. rename the old one to Rgui31.exe. The default setup already installs user packages into a local directory with a versioned name, so that shouldn't be a problem. Se

Re: [R] plot: rug colors

2015-05-24 Thread Duncan Murdoch
t support multiple colours of tick marks. So what you could do is call rug() once for each colour: # This line is not needed in your example, but might be in general... rugcols <- rep(rugcols, length.out=length(vals1)) for (col in unique(rugcols)) { show <- rugcols == col rug(vals1[sho

Re: [R] R CMD methods and ggplot2 advice

2015-05-26 Thread Duncan Murdoch
source is online somewhere, a link to it would really help. If not, then please include a copy of the DESCRIPTION file (so we can see how you declared dependence on methods), and extracts from the source of CreditEnhancement() where you use Period, etc. Duncan Murdoch On 25/05/2015 8:24 PM, Glenn Sch

Re: [R] Find and replace backslashes XXXX

2015-05-27 Thread Duncan Murdoch
d another level of escaping, i.e. gsub("","/","X:\\Classes\\TT\\Automation") The second level of escaping is for the regexpr processor. It would need to be done in the first or second strings, but not in the third, which is the data. Duncan Murdoch > > bes

Re: [R] Find and replace backslashes XXXX

2015-05-27 Thread Duncan Murdoch
On 27/05/2015 8:55 AM, Dan Abner wrote: > Hi Ista, > > Is there no way to not escape the backslash in the pathway? You don't need to escape it if you read it from a file, get it from list.files(), etc. You only need to escape it if you are writing a literal string in R code.

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