Re: [R] distance by sea

2014-06-07 Thread Yvan Richard
Tell me if I'm wrong, but I am guessing that you are trying to calculate the minimum distance between two points, given the presence of barriers between them. For this problem, I have been using cost distances. By giving a raster representing the cost of crossing one cell of the landscape, the min

Re: [R] distance by sea

2014-06-07 Thread jwd
On Thu, 5 Jun 2014 14:58:11 +0200 Giulia Fassio wrote: > Hello, > > someone know if it is possible to use R to calculate distance by sea > between two geographic coordinates? I have many points in the sea and > I want to create a matrix using R of the length of trajectories that > pass only trou

Re: [R] Interval for rnorm command?

2014-06-07 Thread Rolf Turner
On 08/06/14 02:23, zagreus wrote: Hello everyone! I want to create a data vector using the "rnorm" command. Let's say /x <- rnorm(100, 1, 2)/. This gives me 100 values from the specific normal distribution. However, I want to generate a variable that has a certain range of values, e.g. values ca

Re: [R] Help on postscript

2014-06-07 Thread Jim Lemon
On Sat, 7 Jun 2014 06:48:49 AM Yijia Wang wrote: > Hello everyone, > > I'm a beginner on R, and I recently met a paragraph of code that I don't > quite understand, anyone could nicely offer me some detailed explanation on > it? Many thanks, and I'll wait on-line. Here is the code: > > postscrip

[R] Help with R package

2014-06-07 Thread Milan Bimali
Dear R Community, I am in process of developing an R package which in turn depends on a package that is not available in CRAN but has to be downloaded from a web source (as follows). Could someone guide me on how to include the package listed in "Depends" of the Description file. I have the packa

[R] rake() error message

2014-06-07 Thread Michael Willmorth
I'm teaching myself how to use rake() in the R "survey" package, using Thomas Lumley's "Complex Surveys" book. Working with one of my data sets, I received an error that has me stumped. Here is the code I used: d473.raked <- rake(sdes473, sample=list(~m01, ~m02, ~m03, ~m04, ~m05, ~m06c, ~m07c,

[R] copula fitting

2014-06-07 Thread mudit gupta
Hi guys, can i fit a copula to two marginal distributions with different sample size? like one has 2340 observations and other has 1912. thanks Mudit [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz

[R] Discrete distributions in R

2014-06-07 Thread tmalves
Hello there, I am a new R user. I would like to test eight discrete distributions as Barrigossi et al. 2001. Goodness-of-fit was indicated by chi-square test. They used a Fortran program for fitting the discrete frequency distributions:

[R] Interval for rnorm command?

2014-06-07 Thread zagreus
Hello everyone! I want to create a data vector using the "rnorm" command. Let's say /x <- rnorm(100, 1, 2)/. This gives me 100 values from the specific normal distribution. However, I want to generate a variable that has a certain range of values, e.g. values can't exceed the interval /[-3.7; 3.7]

[R] Help on postscript

2014-06-07 Thread Yijia Wang
Hello everyone, I'm a beginner on R, and I recently met a paragraph of code that I don't quite understand, anyone could nicely offer me some detailed explanation on it? Many thanks, and I'll wait on-line. Here is the code: postscript("SPreturns_tplot.ps",width=6,height=5) # Figure 19.2 par(mfrow

Re: [R] Package 'effects' plotting allEffects question

2014-06-07 Thread Michael Friendly
just use plot(Effect("myvar", mymodel)) On 6/6/2014 11:28 AM, Nwinters wrote: Is there a way to plot just the response function for one variable, instead of every variable on the same plot? my model has 13 variables and the plot produces a graph for each of these on the same plot, which is use

Re: [R] plot in package psych with function error.bars.by

2014-06-07 Thread William Revelle
Tham and Jim, As usual, my first response to this is when you find a problem with the psych package, write me (as author) as well as the R-help list. In addition, always include which version of psych you are running. That will help in the debugging. The current version 1.4.5 on CRAN draws “

Re: [R] error in R program

2014-06-07 Thread Charles Determan Jr
REPLY TO ALL FOR THE R-HELP LIST!!! I apologize for the bluntness but you must realize that it is critical if you desire to get help on the mailing list beyond a single person your question must actually get to the mailing list. My expertise only goes so far and there is an infinitely larger comm

Re: [R] Help with factor levels and reference level

2014-06-07 Thread Jim Lemon
On Fri, 6 Jun 2014 11:16:11 AM Nwinters wrote: > I have a variable coded in Stata as follows: > ** > *gen sat_pm25cat_=. > replace sat_pm25cat_= 1 if (sat_pm25>=4 & sat_pm25<=7.1 & sat_pm25!=.) > replace sat_pm25cat_= 2 if (sat_pm25>=7.1 & sat_pm25<=10) > replace sat_pm25cat_= 3 if (sat_pm25>=10.1

Re: [R] Package 'effects' plotting allEffects question

2014-06-07 Thread Ista Zahn
See ?Effect On Jun 6, 2014 9:38 PM, "Nwinters" wrote: > Is there a way to plot just the response function for one variable, instead > of every variable on the same plot? > > my model has 13 variables and the plot produces a graph for each of these > on > the same plot, which is useless. > > > > -

Re: [R] finding average of entire rows to equal values in a vector

2014-06-07 Thread arun
Hi, This is not clear. If this is a combination of rows using a specific formula as you showed, use ?combn dat <- read.table(text="0.7, 0.3, 0.6, 0.9 1.0, 0.1, 0.4, 0.7 1.2, 0.8, 0.3, 0.1",sep=",",header=FALSE) indx <- combn(seq(dim(dat)[1]), 2) vec1 <- c(0.86, 0.46, 0.5, 0.63) indx1 <- sapply(

Re: [R] Data framing question

2014-06-07 Thread arun
Hi, You may also try: library(data.table) dt1 <- data.table(dat1, key = "identif") dt2 <- copy(dt1) dt3 <- copy(dt1) dt1[,c("roa1", "eta1") := list(c(NA, roa[-.N]),c(NA, diff(eta))), by=identif] #or dt2[, `:=`(c("roa1", "eta1"), list(c(NA, roa[-.N]), c(NA, diff(eta, by = identif] # or dt3[,