Re: [R] source() fails in same directory as script: cannot find file

2018-10-26 Thread Jeff Newmiller
I haven't seen mention of what OS or filesystem types are involved, but it superficially looks like it might be one of those cases where the filesystem is case-sensitive... check that all your directory and file names are capitalized correctly. On October 26, 2018 1:11:19 PM PDT, Jeremie Juste

[R] Question for help

2018-10-26 Thread mónica queijeiro via R-help
How do I interpret p and q in the corARMA correlation structure? I understand that p is the autoregessive order and q is the moving average, but I don't know how to interpret what does it means when it is (2,3) or (2,2) for example. Can anyone give me a simple explanation? [[alternative H

Re: [R] source() fails in same directory as script: cannot find file

2018-10-26 Thread Jeremie Juste
Hello, I suspect the error is in the file input-summerize.R. I creating a new file input-summerize2.R with only print("hello") for instance and check if > setwd("~/documents/white-papers/geochemistry/willamette-river-mercury/scripts") > source("input-summerize2.R") works Hope it helps, Jerem

Re: [R] source() fails in same directory as script: cannot find file [FIXED]

2018-10-26 Thread Rich Shepard
On Fri, 26 Oct 2018, Ista Zahn wrote: No, the script is _not_ there. Compare your code: source('input-summarize.R') to the contents of the directory: input-summerize.R The moral of the story is, use tab-completion or copy/paste. Ista, Thanks for catching the typo that I kept misssi

Re: [R] Calculating just a single row of dissimilarity/distance matrix

2018-10-26 Thread Jan van der Laan
Using another implementation of the gower distance: library(gower) gower_dist(iris[1,], iris) HTH, Jan On 26-10-18 15:07, Aerenbkts bkts wrote: I have a data-frame with 30k rows and 10 features. I would like to calculate distance matrix like below; gower_dist <- daisy(data-frame, metr

Re: [R] source() fails in same directory as script: cannot find file

2018-10-26 Thread Ista Zahn
On Fri, Oct 26, 2018 at 2:16 PM Rich Shepard wrote: > > On Fri, 26 Oct 2018, Ista Zahn wrote: > > > I'm confused. It seems the error is that the file can't be found; if > > so, what does it matter what is in the file? > > Ista, > >Beats me. > > > As far as I can see you are either not in the d

Re: [R] source() fails in same directory as script: cannot find file

2018-10-26 Thread Rich Shepard
On Fri, 26 Oct 2018, Ista Zahn wrote: I'm confused. It seems the error is that the file can't be found; if so, what does it matter what is in the file? Ista, Beats me. As far as I can see you are either not in the directory you think you are, or b) the file is not named what you think it

Re: [R] source() fails in same directory as script: cannot find file

2018-10-26 Thread Ista Zahn
Hi Rich, I'm confused. It seems the error is that the file can't be found; if so, what does it matter what is in the file? As far as I can see you are either not in the directory you think you are, or b) the file is not named what you think it is. Best, Ista On Fri, Oct 26, 2018 at 12:30 PM Rich

[R] source() fails in same directory as script: cannot find file

2018-10-26 Thread Rich Shepard
I'm not seeing my error even after reading ?source and a couple of web fora threads. Running R-3.5.1 on Slackware-14.2. The scripts/ directory has the file 'input-summarize.R' with these lines: sites <- read.table('../data/stations.dat', header=T, sep=',', stringsAsFactors=T) sink('../analy

Re: [R] Calculating just a single row of dissimilarity/distance matrix

2018-10-26 Thread Eric Berger
> first_row_dist <- as.numeric(gower_dist)[1:(attr(gower_dist,"Size")-1)] will give you the distances of the first row from the subsequent rows. HTH, Eric On Fri, Oct 26, 2018 at 4:07 PM Aerenbkts bkts wrote: > I have a data-frame with 30k rows and 10 features. I would like to > calculate

[R] Calculating just a single row of dissimilarity/distance matrix

2018-10-26 Thread Aerenbkts bkts
I have a data-frame with 30k rows and 10 features. I would like to calculate distance matrix like below; gower_dist <- daisy(data-frame, metric = "gower"), This function returns whole dissimilarity matrix. I want to get just the first row. (Just distances of the first element in data-frame). How

Re: [R] "logical indexing, " [was] match() question or needle haystack problem for a data.frame

2018-10-26 Thread Fox, John
Dear Knut, > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Knut > Krueger > Sent: Friday, October 26, 2018 2:29 AM > To: r-help mailing list > Subject: Re: [R] "logical indexing, " [was] match() question or needle > haystack > problem for a data.fra