[R] Different output from lm() and lmPerm lmp() if categorical variables are included in the analysis

2013-11-08 Thread Agustin Lobo
I've found a problem when using categorical variables in lmp() from package lmPerm According to help(lmp): This function will behave identically to lm() if the following parameters are set: perm=, seq=TRUE, center=FALSE.) But not in the case of including categorical variables: require(lmPerm)

[R] [R-pkgs] ndl 0.2.13 released today.

2013-11-08 Thread Cyrus Shaoul
Dear R-package Folk, I am pleased to announce the release of a new version of the ndl package ( http://cran.r-project.org/web/packages/ndl/) What is NDL? It is a simple learning model based on the Rescorla-Wagner model of discrimination learning. I have become the new maintainer, replacing Dr.

Re: [R] problem with interaction in lmer even after creating an interaction variable

2013-11-08 Thread a_lampei
Thank you very much, First, sorry for posting on wrong mailing list, I did not know that there exists a special one for lmer. Yes, there are collinearities in the data. Still, I would like to have the variables in one model to compare explained variability. Is there some option, or it is simply

[R] Graph dashboard

2013-11-08 Thread mohan . radhakrishnan
Hi, I have been exploring graph dashboards like http://sematext.com/img/products/spm/spm-solr-overview.png. I use R but haven't attempted to create a dashboard like this. I am thinking of parsing logs and showing dynamic logs - logs that fit into a small window but move left or right

Re: [R] Inserting 17M entries into env took 18h, inserting 34M entries taking 5+ days

2013-11-08 Thread Magnus Thor Torfason
Thanks to Thomas, Martin, Jim and William, Your input was very informative, and thanks for the reference to Sedgwick. In the end, it does seem to me that all these algorithms require fast lookup by ID of nodes to access data, and that conditional on such fast lookup, algorithms are possible

[R] Remove a column of a matrix with unnamed column header

2013-11-08 Thread Kuma Raj
I have a matrix names test which I want to convert to a data frame. When I use a command test2-as.data.frame(test) it is executed without a problem. But when I want to browse the content I receive an error message Error in data.frame(outcome = c(cardva, respir, cereb, neoplasm, : duplicate

[R] Crime hotspot maps (kernel density)

2013-11-08 Thread David Studer
Hi everybody, does anyone of you know how to create a (crime) hotspot map using R? Are there any packages or do you know any ressources? It should be something like this: http://www.caliper.com/Maptitude/Crime/MotorVehicleTheft2.png (but it doesnt necessarely have to be a map) Many thanks,

Re: [R] prod and F90 product

2013-11-08 Thread Jim Holtman
sounds like FAQ 7.31 Sent from my iPad On Nov 7, 2013, at 18:39, Filippo ingf...@gmail.com wrote: Hi, I'm having strange differences between the R function prod ad the F90 function product. Processing the same vector C (see attachment). I get 2 different results: prod(C) = 1.069678e-307

Re: [R] Remove a column of a matrix with unnamed column header

2013-11-08 Thread Berend Hasselman
On 08-11-2013, at 10:40, Kuma Raj pollar...@gmail.com wrote: I have a matrix names test which I want to convert to a data frame. When I use a command test2-as.data.frame(test) it is executed without a problem. But when I want to browse the content I receive an error message Error in

Re: [R] Remove a column of a matrix with unnamed column header

2013-11-08 Thread Kuma Raj
Beend, Thanks for that. Conversion of test to a data frame resulted in a factor. Is there a possibility to selectively convert to numeric? I have tried this code and that has not produced the intended result. test[, c(2:4)] - sapply(test[, c(2:4)], as.numeric) On 8 November 2013 11:31, Berend

Re: [R] Error running MuMIn dredge function using glmer models

2013-11-08 Thread Kamil Bartoń
There is indeed a glitch in 'dredge' that prevents you from seeing the actual error message. It is explained in ?dredge, in section Missing values. (it's been corrected now in 1.9.14, on R-forge) kamil On 2013-11-08 11:00, r-help-requ...@r-project.org wrote: --

[R] how to derive true surface area from `computeContour3d' (misc3d package)

2013-11-08 Thread j. van den hoff
I want to compute the total surface area of an isosurface in 3D space as approximated with `computeContour3d' by adding up the areas of the triangles making up the contour surface. problem: the vertex matrix returned by `computeContour3d' in general seems to provide the vertices not in the

[R] how to derive true surface area from `computeContour3d' (misc3d package) -- follow up

2013-11-08 Thread j. van den hoff
regarding my previous mail for this topic, I have in the meantime identified my misconception. actually, `computeContour3d' returns the vertices just fine in the correct coordinate frame. the misconception was caused basically by assuming that the `level' argument was a fractional

Re: [R] how to derive true surface area from `computeContour3d' (misc3d package) -- follow up

2013-11-08 Thread Barry Rowlingson
On Fri, Nov 8, 2013 at 1:01 PM, j. van den hoff veedeeh...@googlemail.com wrote: ps: it of course would still be nice, if the surface area (or a vector containing the individual triangle areas) were returned to the caller as well ... Does the 'surfaceArea' function in the sp package do what

Re: [R] how to derive true surface area from `computeContour3d' (misc3d package) -- follow up

2013-11-08 Thread j. van den hoff
On Fri, 08 Nov 2013 15:32:00 +0100, Barry Rowlingson b.rowling...@lancaster.ac.uk wrote: On Fri, Nov 8, 2013 at 1:01 PM, j. van den hoff veedeeh...@googlemail.com wrote: ps: it of course would still be nice, if the surface area (or a vector containing the individual triangle areas) were

Re: [R] problem with interaction in lmer even after creating an interaction variable

2013-11-08 Thread Ben Bolker
a_lampei anna.lampei-bucharova at uni-tuebingen.de writes: Thank you very much, First, sorry for posting on wrong mailing list, I did not know that there exists a special one for lmer. Yes, there are collinearities in the data. Still, I would like to have the variables in one model to

Re: [R] Remove a column of a matrix with unnamed column header

2013-11-08 Thread arun
Hi, Try:  test2 - as.data.frame(test,stringsAsFactors=FALSE) test2[,c(2:4)] - lapply(test2[,c(2:4)],as.numeric) A.K. On Friday, November 8, 2013 6:24 AM, Kuma Raj pollar...@gmail.com wrote: Beend, Thanks for that. Conversion of test to a data frame resulted in a factor. Is there a possibility

[R] SNPRelate: Plink conversion

2013-11-08 Thread Danica Fabrigar
Hi, Following my earlier posts about having problems performing a PCA, I have worked out what the problem is. The problem lies within the PLINK to gds conversion. It seems as though the SNPs are imported as samples and in turn, the samples are recognised as SNPs: snpsgdsSummary(chr2L) Some

Re: [R] SNPRelate: Plink conversion

2013-11-08 Thread Bert Gunter
Doesn't this belong on Bioconductor rather than here? -- Bert On Fri, Nov 8, 2013 at 6:04 AM, Danica Fabrigar danica_...@hotmail.com wrote: Hi, Following my earlier posts about having problems performing a PCA, I have worked out what the problem is. The problem lies within the PLINK to gds

Re: [R] Error running MuMIn dredge function using glmer models

2013-11-08 Thread Martin Turcotte
Removing na.action=na.omit solved the problem. Thanks for the help and thanks Dr. Batoń for making such useful package. Mart Martin Turcotte, Ph. D. mart.turco...@gmail.com [[alternative HTML version deleted]] __

Re: [R] Uploading Google Spreadsheet data into R

2013-11-08 Thread David Carlson
Stripping down to the bare essentials seems to get it. In particular making the query just select * instead of select * where B!='' works. You don't need the processing that the more complicated Guardian web page requires. After loading the RCurl package and creating the gsqAPI function:

Re: [R] Uploading Google Spreadsheet data into R

2013-11-08 Thread Luca Meyer
It does indeed. Thank you David, Luca 2013/11/8 David Carlson dcarl...@tamu.edu Stripping down to the bare essentials seems to get it. In particular making the query just select * instead of select * where B!='' works. You don't need the processing that the more complicated Guardian web

[R] select .txt from .txt in a directory

2013-11-08 Thread Zilefac Elvis
Hi, I have 300 .txt files in a directory. Out of this 300, I need just 100 of the files. I have the names of the 100 .txt files which are also found in the 300 .txt files. How can I extract only the 100 .txt files from the 300 ,txt files? e.g given d1.txt, ds.txt, dx.txt, df.txt...d300.txt, how

Re: [R] Nonnormal Residuals and GAMs

2013-11-08 Thread Robert Rigby
Hi Colin, The GAMLSS package allows modelling of the response variable distribution using either Exponential family or non-Exponential family distributions. It also allows modelling of the scale parameter (and hence the dispersion parameter for Exponential family distributions) using explanatory

Re: [R] select .txt from .txt in a directory

2013-11-08 Thread Sarah Goslee
How do you decide which ones you need? Is there some pattern that lets you distinguish needing df.txt from not needing ds.txt? You say you have the names - how do you have them? In a text file? What are you trying to do with the text files? Sarah On Fri, Nov 8, 2013 at 12:33 PM, Zilefac Elvis

Re: [R] select .txt from .txt in a directory

2013-11-08 Thread Simon Zehnder
I do not understand the question. If you already know the names what is the problem to select the files by names? If you have the names but not inside of R you have to find a name pattern to avoid typing them in. Is there a pattern, e.g. da.txt, db.txt, dc.txt? On 08 Nov 2013, at 18:33,

Re: [R] select .txt from .txt in a directory

2013-11-08 Thread Bert Gunter
1. Please don't post in HTML (see posting guide). 2. What do you mean by extract? 3. Your qiestion sounds very basic. Have you read An Introduction to R or other online R tutorial? If not please do so before posting further. All of R's file input functions allow you to specify the directory path

Re: [R] select .txt from .txt in a directory

2013-11-08 Thread Zilefac Elvis
All files are text files. They are found in a folder on my computer.  Assume that I know the names of some of the files I want to select from the 300 txt files. How can I do this in R. Atem. On Friday, November 8, 2013 11:44 AM, Simon Zehnder szehn...@uni-bonn.de wrote: I do not understand

Re: [R] select .txt from .txt in a directory

2013-11-08 Thread Simon Zehnder
If you want to type in the names by hand, you can simply use read.table to load them into R … I still don’t get the aim of your text file handling On 08 Nov 2013, at 18:51, Zilefac Elvis zilefacel...@yahoo.com wrote: All files are text files. They are found in a folder on my computer.

[R] Adding Proxy information in 'R' application

2013-11-08 Thread Batista, Jose
R-Help Mailing List, I'm currently working with a user who is actively trying to download install libraries for 'R' on her office PC. While using install.packages(packageName, dependencies = TRUE) works without a problem on our home PCs, we use a proxy at the firm and therefore it doesn't let

Re: [R] How to show the second abline ?

2013-11-08 Thread Domokos Péter
Hi, I have the next script in R: x=c(8.0,17.5,23.5,32.0,38.5,48.5,58.5,68.5) y=c(267,246,290,294,302,301,301,298) gap.plot(x,y,ylim=c(8,310),pch=8,cex=0.5, xlab=c('Time'),ylab=c('uS'), gap=c(30,240),gap.axis='y', ytics=c(10,20,30,270,280,290,300)) abline(h=31,col='white',lwd=20)

Re: [R] SNPRelate: Plink conversion

2013-11-08 Thread Danica Fabrigar
Hi Bert, I thought it was suitable to post the question on the R mailing list first seeing as the problem/question is related to an R package. Danica Date: Fri, 8 Nov 2013 08:14:03 -0800 Subject: Re: [R] SNPRelate: Plink conversion From: gunter.ber...@gene.com To:

Re: [R] How to show the second abline ?

2013-11-08 Thread Sarah Goslee
I have no idea where gap.plot() came from, so I can't reproduce this, but you almost certainly need y ~ x in your formula. abline(coef(lm(y ~ x)),col=1) Sarah On Fri, Nov 8, 2013 at 11:04 AM, Domokos Péter dom...@gmail.com wrote: Hi, I have the next script in R:

Re: [R] Fw: select .txt from .txt in a directory

2013-11-08 Thread Sarah Goslee
Hi, I'm not particularly interested in opening unsolicited binary attachments. Why don't you use dput() to provide part of your data to the R-help list (copied on this email; emailing just me not being that useful). You still haven't told us what you want to do with the named text files - read

[R] Revolutions blog: October roundup

2013-11-08 Thread David Smith
Revolution Analytics staff write about R every weekday at the Revolutions blog: http://blog.revolutionanalytics.com and every month I post a summary of articles from the previous month of particular interest to readers of r-help. In case you missed them, here are some articles related to R from

Re: [R] select .txt from .txt in a directory

2013-11-08 Thread Simon Zehnder
Elvis, first, keep things on the list - so others can learn and comment. Second, as Sarah already commented: We do not like to open unsolicited binary attachments on the list. Sarah gives a good hint how to post data to the list. What I would do so far is use the matching columns to get the

[R] Date handling in R is hard to understand

2013-11-08 Thread Alemu Tadesse
Dear All, I usually work with time series data. The data may come in AM/PM date format or on 24 hour time basis. R can not recognize the two differences automatically - at least for me. I have to specifically tell R in which time format the data is. It seems that Pandas knows how to handle date

[R] C50 Node Assignment

2013-11-08 Thread David Winsemius
In my role as a moderator I am attempting to bypass the automatic mail filters that are blocking this posting. Please reply to the list and to: = Kevin Shaney kevin.sha...@rosetta.com C50 Node Assignment I am using C50 to classify individuals into 5 groups / categories

Re: [R] Adding Proxy information in 'R' application

2013-11-08 Thread Carina Salt
Hi Jose I faced the same problem at my workplace too - the solution (at least for us) was to insert the following function into the Rprofile.ste file in the etc folder in the R install folder - or, if the .First function already exists, you could just insert the line beginning Sys.setenv(….)

Re: [R] Date handling in R is hard to understand

2013-11-08 Thread Bert Gunter
Have a look at the lubridate package. It claims to try to make dealing with dates easier. -- Bert On Fri, Nov 8, 2013 at 11:41 AM, Alemu Tadesse alemu.tade...@gmail.com wrote: Dear All, I usually work with time series data. The data may come in AM/PM date format or on 24 hour time basis. R

Re: [R] Crime hotspot maps (kernel density)

2013-11-08 Thread Rolf Turner
It is not clear to me what you want/need to do, but it is possible that the spatstat package (in particular the function density.ppp()) might help you. cheers, Rolf Turner On 11/08/13 23:10, David Studer wrote: Hi everybody, does anyone of you know how to create a (crime) hotspot

Re: [R] How to show the second abline ?

2013-11-08 Thread Jim Lemon
On 11/09/2013 03:04 AM, Domokos Péter wrote: Hi, I have the next script in R: x=c(8.0,17.5,23.5,32.0,38.5,48.5,58.5,68.5) y=c(267,246,290,294,302,301,301,298) gap.plot(x,y,ylim=c(8,310),pch=8,cex=0.5, xlab=c('Time'),ylab=c('uS'), gap=c(30,240),gap.axis='y', ytics=c(10,20,30,270,280,290,300))

Re: [R] Date handling in R is hard to understand

2013-11-08 Thread Jim Lemon
Hi Mihretu, Can you grep for AM or PM? If so build your format string depending upon whether one of these exists in the date string. Jim On 11/09/2013 06:41 AM, Alemu Tadesse wrote: Dear All, I usually work with time series data. The data may come in AM/PM date format or on 24 hour time

[R] Geweke Diagnostic in CODA package

2013-11-08 Thread Marino David
Hi all: The CODA package provides Geweke Diagnostic method for convergence checking. The geweke.diag in CODA returns Z-score value but not give a conclustion that it is convergence or not. So I'd like to know how small/big the magnitude of Z-score is corresponding to the convergence of a chain.

[R] making chains from pairs

2013-11-08 Thread Hermann Norpois
Hello, having a data frame like test with pairs of characters I would like to create chains. For instance from the pairs A/B and B/I you get the vector A B I. It is like jumping from one pair to the next related pair. So for my example test you should get: A B F G H I C F I K D L M N O P test

Re: [R] SNPRelate: Plink conversion

2013-11-08 Thread Hermann Norpois
You might try to import your data in GenABEL, use as.numeric (gtdata (data)) to get a matrix that delivers you 0,1 or 2 for each snp and id (observation) and then try prcomp. Also check this http://gettinggeneticsdone.blogspot.de/2011/10/new-dimension-to-principal-components_27.html

Re: [R] select .txt from .txt in a directory

2013-11-08 Thread arun
Hi Atem, It is not clear what you wanted to do.  If you want to transfer the subset of files from the main folder to a new location, then you may try: (make sure you create a copy of the original .txt folder before doing this) I created three sub folders and two files

Re: [R] Please help me to short my code

2013-11-08 Thread arun
Hi, Try either: Ceramic - read.table(ceramic.dat,header=TRUE) Ceramic1 - Ceramic Ceramic$indx - ((seq_len(nrow(Ceramic))-1)%/%60)+1 library(plyr) DF1 - data.frame(M=as.vector(t(ddply(Ceramic,.(indx), colwise(mean))[,-1])), S=as.vector(t(ddply(Ceramic,.(indx),colwise(sd))[,-1])),Rep = 60)