[R] prediction with neural network

2015-11-13 Thread javad bayat
Hi all; I am working with a data set, pH of a lake water, and there is some gap in my data. I it possible to predict these gaps by neural network? If so please help to use the right code. Many thanks. -- Best Regards Javad Bayat M.Sc. Environment Engineering Alternative Mail: bayat...@yahoo.

Re: [R] Decast

2015-11-13 Thread David Winsemius
> On Nov 13, 2015, at 5:34 PM, Val wrote: > > Hi all, > I have a data frame called "df" it's dimension is > > dim(df) > [1] 9540634 38 > >> From this data frame the variable * df$X1 *has about 78, 000 unique > values and *df$region *has two classes. I am trying to do the following

[R] Decast

2015-11-13 Thread Val
Hi all, I have a data frame called "df" it's dimension is dim(df) [1] 9540634 38 >From this data frame the variable * df$X1 *has about 78, 000 unique values and *df$region *has two classes. I am trying to do the following operation The goal is reshaping the variable from long to wid

Re: [R] R setting number of knots in smoothing splines

2015-11-13 Thread Duncan Murdoch
On 13/11/2015 2:34 PM, writetoh...@gmail.com wrote: Dear all, I am solving a problem about setting a knots in function smooth. spline. I am not very sure how to set a knot points in this. I understand it accept only number of points, but not distances between them. Can you help me how to spe

Re: [R] R setting number of knots in smoothing splines

2015-11-13 Thread Bert Gunter
1. I am not an expert on smoothing splines, but what you are trying to do seems unwise. See e.g. Chapter 5 of Hastie et. al. "The Elements of Statistical Learning." 2. However, could you not do what you want by setting some of the weights, w, to 0? Cheers, Bert Bert Gunter Bert Gunter "Data is

[R] R setting number of knots in smoothing splines

2015-11-13 Thread writetohana
Dear all, I am solving a problem about setting a knots in function smooth. spline. I am not very sure how to set a knot points in this. I understand it accept only number of points, but not distances between them. Can you help me how to specify the distances? Thanks a lot. Regards!

Re: [R] Suprising R behaviour

2015-11-13 Thread Duncan Murdoch
On 13/11/2015 8:11 AM, Ilgaz S wrote: Hello everybody, I am new to R and I discovered something that suprise me and I have a question about it. Today I wanted to return a bit array which represents this: if( arbitrary point above the line) return TRUE else return FALSE First I tough

Re: [R] Environment question

2015-11-13 Thread Duncan Murdoch
On 13/11/2015 12:53 PM, ALBERTO VIEIRA FERREIRA MONTEIRO wrote: I have another environment question. I understand why this works as expected: f.factory <- function() { y <- 2 fname <- paste("plus", y, sep = ".") f <- function(x) x + y assign(fname, f, envir = globalenv()) } f.facto

[R] Suprising R behaviour

2015-11-13 Thread Ilgaz S
Hello everybody, I am new to R and I discovered something that suprise me and I have a question about it. Today I wanted to return a bit array which represents this: if( arbitrary point above the line) return TRUE else return FALSE First I tought I would use for loop and access every el

[R] Options for running Hausman-Taylor with robust standard errors

2015-11-13 Thread Alex I
This has been eating at me for a very long time. From everything I understand, the plm package does not yet allow robust standard errors to be calculated for the Hausman-Taylor using the coeftest command you would for other estimators (i.e. pooled, within, random). This is of course the error th

Re: [R] Environment question

2015-11-13 Thread William Dunlap
Make a new environment for each function and populate it with the variables that your functions require. local() is a convenient way to do this: f.factory3 <- function(destinationEnvir = globalenv()) { for (y in 2:3) { fname <- paste("plus", y, sep = ".") f <- local(function(x) x + y, e

Re: [R] Environment question

2015-11-13 Thread ALBERTO VIEIRA FERREIRA MONTEIRO
I have another environment question. I understand why this works as expected: f.factory <- function() { y <- 2 fname <- paste("plus", y, sep = ".") f <- function(x) x + y assign(fname, f, envir = globalenv()) } f.factory() plus.2(2) # 4 and I also understand why this does NOT work: f.f

Re: [R] "haven" - read_spss: How to avoid extracting value labels instead of long labels?

2015-11-13 Thread Dimitri Liakhovitski
You are absolutely right, Ista - it's not haven's fault, my bad. Of course, it's the attr function and exact = TRUE. Thank you so much! Dimitri On Fri, Nov 13, 2015 at 10:00 AM, Ista Zahn wrote: > Why do you think this is a bug in have? To the contrary, I don't think > this has anything to do wit

Re: [R] Error survreg: Density function returned an an invalid matrix

2015-11-13 Thread Israel Ortiz
Thanks Terry but the error persists. See: > library(foreign)> library(survival)> library(VGAM) > mypareto <- > list(name='Pareto',+ init= function(x, weights,parms){+ > alpha <- length(x)/(sum(log(x)))#this is a MLE for alpha+ > c(media <-(

Re: [R] "haven" - read_spss: How to avoid extracting value labels instead of long labels?

2015-11-13 Thread Ista Zahn
Why do you think this is a bug in have? To the contrary, I don't think this has anything to do with haven at all. The problem seems to be that attr does partial matching by default. Check it out: > attr(x, "labels") <- c("foo", "bar", "baz") > attr(x, "label") [1] "foo" "bar" "baz" and see ?attr

[R] Release of R 3.2.3 scheduled for December 10

2015-11-13 Thread Peter Dalgaard
We intend to have a patch release on December 10, nickname will be "Wooden Christmas-Tree". The detailed schedule will be made available via developer.r-project.org as usual (later today). For the R Core Team, Peter D. ___ r-annou...@r-project.org ma

Re: [R] student looking for help with assignment in R

2015-11-13 Thread Jim Lemon
Hi Christopher, If you want to plot the movements of cells, perhaps a look at the help page for color.scale.lines (plotrix) will get you started. Jim On Fri, Nov 13, 2015 at 8:47 PM, PIKAL Petr wrote: > Hi > > What does it mean "to monitor". If you want to compute path length for > each cell i

Re: [R] student looking for help with assignment in R

2015-11-13 Thread PIKAL Petr
Hi What does it mean "to monitor". If you want to compute path length for each cell it seems to me that it is a simple problem of trigonometry sqrt(a^2+b^2) = c is a length of a segment between two points. a and b can be computed by differencing x and y coordinates. If I read your data tempx<

[R] student looking for help with assignment in R

2015-11-13 Thread Clarkson, Christopher
Hello, I am a student and I only have basic knowledge of R. I have been given the task of having to monitor cells' migration in 2 dimensions. I have been given 2 files one containing the the X-coordinates and the other contains the Y-coordinates of the cells. There are 50 cells and there moveme