Re: [R] R programming

2015-05-22 Thread Jim Lemon
Hi varun, A few suggestions. Learn to use the built in help system, whichever version (text, HTML, PDF) you prefer. Learn to use one of the search programs (see http://cran.r-project.org/search.html) Try to do every task that you can in R. Jim On Sat, May 23, 2015 at 9:01 AM, varun joshi wrote:

Re: [R] R programming

2015-05-22 Thread Jeff Newmiller
Practice (use the str function frequently, print small pieces of complex expressions to understand how they are constructed). Read the Introduction to R document. Especially the part about indexing. Read Pat Burns' The R Inferno. Also remember to post in plain text on this list next time -

Re: [R] R programming

2015-05-22 Thread Shivi82
Hi Varun, Courses offered from Coursera & EDX are very informative and carry details in depth. However I agree with your point that these courses are very fast paced & sometimes very technical in nature. (I found the same when I went for Linear regression course) I have also recently started lear

Re: [R] Roxygen Documentation

2015-05-22 Thread Jeff Newmiller
I think you are looking for a way to make a vignette. Consider using the Sweave variant of knitr. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go..

[R] Problem with comparing multiple data sets

2015-05-22 Thread Mohammad Alimohammadi
Hi everyone, I am very new to R and I have a task to do. I appreciate any help. I have 3 data sets. Each data set has 4 columns. For example: Class Comment Term Text 0 com1aactext1 2 com2aaxtext2 1 com3vvxtext3 Now I need t c

[R] Roxygen Documentation

2015-05-22 Thread Glenn Schultz
Hello R help, I am in the process of creating the companion to my book which illustrates how to call Bond Lab (my R package for MBS and fixed income).   I started with the idea of scripts and then functions calling functions.   Neither seemed very good to me.  I checked a couple of packages (Max

[R] R programming

2015-05-22 Thread varun joshi
Hello there, I wanted to learn R programming over this summer hence I registered for the R programming course on Coursera. I understood most part of the lecture but I'm having a hard time with the assignments. Till now I can write small functions such as calculating mean of a vector or an array.

Re: [R] Heatmap

2015-05-22 Thread Jim Lemon
Hi Carlos, The error from: readShapePoly("depto.shp") may well be that the function cannot find the file. Assuming that there is a file "depto.shp", is it in the working directory of R when you issue this command? Find out by: getwd() I suppose that macintosh computers try to hide the actual lo

Re: [R] ERROR Message

2015-05-22 Thread Jim Lemon
Hi Ivone, This does look a bit like homework as someone else sent a help request with a strikingly similar problem. However, I would first do something like this: is.array(datalist[[1]]) as this is what the error message is saying. Jim On Sat, May 23, 2015 at 2:57 AM, Ivone Figueiredo wrote:

Re: [R] Heatmap

2015-05-22 Thread David Winsemius
On May 22, 2015, at 10:32 AM, Carlos Javier Rincon Rodriguez wrote: > Hi. Good morning. > > I am trying to load a shapefile to do a heatmap of Colombia. I using all > this package: > > library(ctv) > > library(spatial) > > library(ggplot2) > > library(sp) > > library(rgdal) > > library(rge

Re: [R] Debian Rcmdr misses sem leaps etc

2015-05-22 Thread Jeff Newmiller
For those R packages, as a normal user (rather than sysadmin of a shared computer) the OP should accept the default R/3.1 subdirectory in their home directory. --- Jeff NewmillerThe . ...

Re: [R] apply a function to a list of data frames

2015-05-22 Thread Rui Barradas
Hello, You should change your function to accept only one argument, the data.frames, and then use lapply (not sapply). Something like the following. calc <- function(dat) { bias_dmo_max <- round(mean((dat$dmo_12-dat$Eonestep_12), na.rm=TRUE), digits=2) rmse_dmo_max <- round(sqrt(mean((dat$d

Re: [R] apply a function to a list of data frames

2015-05-22 Thread Bert Gunter
Where is your code? I see no invocation of sapply. -- Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 "Data is not information. Information is not knowledge. And knowledge is certainly not wisdom." Clifford Stoll On Fri, May 22, 2015 at 11:02 AM, Stefano Sofia wrote: > D

Re: [R] Debian Rcmdr misses sem leaps etc

2015-05-22 Thread John Fox
Dear Peter, > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Peter > van Summeren > Sent: May-22-15 10:01 AM > To: . > Subject: [R] Debian Rcmdr misses sem leaps etc > > Hello,when I start up Rcmdr under Jessie Debian I get the message that > there ar

[R] apply a function to a list of data frames

2015-05-22 Thread Stefano Sofia
Dear R-users, given a list of dataframes (like below reported), for each month I need to apply a function (called calc). The result should be written in a new list of data frames, one row for each month. I have been trying to use sapply, with no success. Could somebody help me in this? $df1 da

Re: [R] data.table cant find function melt?

2015-05-22 Thread John Kane
Hi Ken, This is strange but look at the example at ?melt , pick the data.table example not the reshape2 example. It looks to me like data.table is using the reshape2 melt() Perhaps data.table used to load reshape2 but now you need to do it explicitly, or at least that's my guess. John Kane K

Re: [R] Heatmap

2015-05-22 Thread Carlos Javier Rincon Rodriguez
Hi. Good morning. I am trying to load a shapefile to do a heatmap of Colombia. I using all this package: library(ctv) library(spatial) library(ggplot2) library(sp) library(rgdal) library(rgeos) library(maptools) library(ggmap) and a using this two commands to load the file: depto<-read

Re: [R] error message

2015-05-22 Thread John Kane
I think we need a couple of things. First we need your post in text not hmtl. R-help removes the html as a security feature and it turns your post into a complete mess. See below. Second we probably need more information and some data. Please read one or both of these http://stackoverflow.co

Re: [R] Debian Rcmdr misses sem leaps etc

2015-05-22 Thread John Kane
On Ubuntu I just let R install new packages wherever it wants. Is R on Jesse suggesting a spot? If so, go with it. John Kane Kingston ON Canada > -Original Message- > From: peter_van_summe...@hotmail.com > Sent: Fri, 22 May 2015 16:00:41 +0200 > To: r-help@r-project.org > Subject: [

[R] data.table cant find function melt?

2015-05-22 Thread Ken Nussear
Hi all, trying to use the melt function in data.table and I'm getting an error Anyone seen this before or know how to fix it? Thanks str(Distdata) Classes ‘data.table’ and 'data.frame': 828451 obs. of 3 variables: $ Poly1 : int 50088 50088 50088 50088 50088 50088 50088 50088 50088 500

[R] ERROR Message

2015-05-22 Thread Ivone Figueiredo
Hi Could you please help me I am trying to fit a Multilevel Poisson regression with the following code ## BUGS CODE ## Multilevel Poisson regression model { for (i in 1:n){ y[i] ~ dpois (lambda[i]) log(lambda[i]) <- mu + b.species[Species[i]] + b.quarter[Quarter[i]] +

[R] error message

2015-05-22 Thread Catarina Maia
Hi Can you please help me :( I am trying to fit a multilevel model but I have received the following message skate.3 <- bugs (skate.data, inits=NULL, skate.parameters, "skates.bug",+ n.chains=2, n.iter=500, + bugs.directory="c:/ProgramFiles(x86)/OpenBUGS/OpenBUGS323",+ program=

[R] Debian Rcmdr misses sem leaps etc

2015-05-22 Thread Peter van Summeren
Hello,when I start up Rcmdr under Jessie Debian I get the message that there are packages missing:sem, markdown, leaps, knitr, aplpackIt then wants to get these from cran. But first I have to tell where to put them: I HAVE NO IDEA.I downloaded Rcmdr via a package program.Can anyone help me to ge

Re: [R] Genetic algorithm workflow Problem..!! Is it right or wrong ??

2015-05-22 Thread Collin Lynch
Rashmi, I think that this might be beyond the scope of this list as it is focused on issues with the R language specifically. It does not look like you have any R errors although we would need to see some output to be sure. With respect to the general GA workflow it appears that you are doing it

Re: [R] compiling R with tuned BLAS

2015-05-22 Thread Charles Determan
Which OS are you using (Windows, Linux (distro), Mac)? When you mention .so files I tend to assume you are using a Linux system. If you are using ubuntu, changing the BLAS used by R is relatively trivial by using 'update-alternatives'. More detail is provided at the following link: http://www.st

Re: [R] Vincentizing Reaction Time data in R

2015-05-22 Thread John Kane
Hi, Gabriel, Do I understand the idea behind 'vincentizing' reaction times? I don't want to work through the Ratcliff, (1979) paper unless I must. Let's say we have a subject , s1, with 50 rt scores. We sort the scores from high to low (or low to high , it makes no difference) then we split t

Re: [R] Selective package installation

2015-05-22 Thread Uwe Ligges
On 18.05.2015 09:14, Partha Sinha wrote: I am using Win 7, 32 bit and R 3.2.0 I want to install few packages via script. The script should first check if the package is already installed (I dont want update). assume the packages are given in a character vector pkg. pkg <- c("MASS", "A") Th

[R] Genetic algorithm workflow Problem..!! Is it right or wrong ??

2015-05-22 Thread Rashmi Naik k
I'm actually looking for a way to use a genetic algorithm to optimize product price's in an e-commerce store. and im doing it in R language. I'm using GA package in r and below is my data set. library(GA) dataset---input1 Production.Cost Product.Price Product.Quality Delivery.Time After.