Re: [R] Faster union of polygons?

2010-06-04 Thread Remko Duursma
Martin, thanks a lot! This speeds things up so much Do you mind if I bundle your punion function in a package I am developing (but of course I will name you the author of the function)? greetings, Remko On Fri, Jun 4, 2010 at 12:17 PM, Martin Morgan mtmor...@fhcrc.org wrote: On

Re: [R] parttioning a matrix corresponding to different levels of y

2010-06-04 Thread sayan dasgupta
Suman take a look if this suffices your purpous x - data.frame(y=as.factor(sample(0:2,1000,replace=TRUE)),x=runif(1000)) x1 - x[x$y==0,] x2 - x[x$y==1,] x3 - x[x$y==2,] On Fri, Jun 4, 2010 at 10:29 AM, suman dhara suman.dhar...@gmail.comwrote: Sir, I have a problem regarding partitioning a

[R] Boxplot: what is shown by default?

2010-06-04 Thread Thomas von Känel
hi, i'm using /boxplot()/ to show some data: x - c(0.99, 0.97, 0.91, 0.72, 1.00, 0.99, 1.02, 0.90, 0.91, 0.90, 1.02, 0.90, 1.35, 1.01, 0.92) boxplot(x) is it correct when i say: /Boxes represent interquartile ranges (IQRs); bold horizontal lines, medians; whiskers, lowest and highest values

[R] R implementation for Text analytics

2010-06-04 Thread Christofer Bogaso
Hi there, is there any R package which address the Text analytics topic? It would also be great if someone point me about some good text books on Text analytics and what statistical tools and techniques are generally used on that field. Thanks and regards, [[alternative HTML version

Re: [R] R Newbie, please help!

2010-06-04 Thread Joshua Wiley
Hey Jeff, I have a few ideas. Each has some different requirements, and to help you choose, I bench marked them. ###START### ##Basic data test - data.frame(totret=rnorm(10^7), id=rep(1:10^4, each=10^3), time=rep(c(1, rep(0, 999)), 10^4)) ##Option 1: probably the most general, but also the

[R] Help on ARFIMA modeling

2010-06-04 Thread ERIC AIDOO
Please I want to perform full data analysis using ARFIMA model but I dont know the right package that can perform all the necessary test on the time series data. ERIC AIDOO [[alternative HTML version deleted]] __ R-help@r-project.org mailing

Re: [R] R Newbie, please help!

2010-06-04 Thread Joshua Wiley
I am not exactly sure how your filtering code is working, but take a look at ?na.omit You will probably need a few additional steps if you want to remove all rows related to a particular id. Also look at ?subset which is a good general way to subset your data. Josh On Thu, Jun 3, 2010 at

Re: [R] import text file into R

2010-06-04 Thread Peter Ehlers
On 2010-06-03 22:51, Dhanasekaran wrote: please look at the error.. LosA-read.table(E:\\Temporary Tasks\\rub\\Los_R\\ca_los.txt,header=T,sep=\t) Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : line 11022 did not have 87 elements That error message seems

Re: [R] import text file into R

2010-06-04 Thread Glen Barnett
On Fri, Jun 4, 2010 at 2:51 PM, Dhanasekaran dhana...@gmail.com wrote: ca_los.txt is my tab delimited large text file which contains about 16lakhs observations. Most readers of this list probably won't know that a 'lakh' is a hundred thousand. 16lakhs means 1.6 million. Glen

[R] Shapes in barplots

2010-06-04 Thread khush ........
Hi, I am making barplots . I am using the default shape of barplots with a pipe but I wants to build bars in various 3d shapes. I have install rgl using install.packages('rgl') for this purpose, but when I am doing library(rgl), it shows Error in library(rgl) : there is no package called 'rgl'

[R] Handling of par() with variables

2010-06-04 Thread Steffen Uhlig
Hello! In order to plot multiple graphs with the same set-up I use the following code-structure: ### # storing old parameter set oldpar - par(no.readonly=T) #copying old parameter set newpar - par(no.readonly=T) #adjusting parameters

[R] strange behaviour of CairoPNG

2010-06-04 Thread Thomas Steiner
Hi, could it be that the text() fuction gives different output for normal png() and CarioPNG()? See the following example and the attached images: the font=2 and font=3 seem to be exchanged! Thanks for help, Thomas CairoPNG(Test-cairo.png,width=750,height=690)

Re: [R] plot polar coordinates

2010-06-04 Thread Jim Lemon
On 06/04/2010 05:05 AM, Thomas Steiner wrote: Thank you Greg, I'll add 180 then. Thanks for the hint with longer radial.lim arguments it works woderfull. The lines function is plotting in Cartesian coordinates, not the polar coordinates. Is there any (lines) function that plots polar

[R] StatET plot problem

2010-06-04 Thread Bunny, lautloscrew.com
Dear all, after trying several suggestions from the list for a nice R-Editor / IDE for MacOS X and really trying some of those that needed to be configured a little more (such as emacs, aquamacs and StatET / Eclipse), I prefer StatET at the moment. I found more experienced like John

Re: [R] import text file into R

2010-06-04 Thread Jim Lemon
On 06/03/2010 09:32 PM, dhanush wrote: can anyone tell me how to import a text file in R? the text file I want to import is a large file, about 800MB in size. Thanks in advance. I tried using the following data-read.table(file,header=T,sep=\t) Hi dhanush, If the problem is with read.table,

Re: [R] Boxplot: what is shown by default?

2010-06-04 Thread Peter Ehlers
On 2010-06-04 0:14, Thomas von Känel wrote: hi, i'm using /boxplot()/ to show some data: x- c(0.99, 0.97, 0.91, 0.72, 1.00, 0.99, 1.02, 0.90, 0.91, 0.90, 1.02, 0.90, 1.35, 1.01, 0.92) boxplot(x) is it correct when i say: /Boxes represent interquartile ranges (IQRs); bold horizontal lines,

Re: [R] StatET plot problem

2010-06-04 Thread Philippe Grosjean
On 04/06/10 10:37, Bunny, lautloscrew.com wrote: Dear all, after trying several suggestions from the list for a nice R-Editor / IDE for MacOS X and really trying some of those that needed to be configured a little more (such as emacs, aquamacs and StatET / Eclipse), I prefer StatET at the

Re: [R] Comparing a 4-point and 5-point Likert scale

2010-06-04 Thread Jim Lemon
On 06/03/2010 11:11 PM, Simon Kiss wrote: Help with survey data: Hello R colleagues, I hope this is an appropriate place to direct this question. It relates specifically to the comparability of a 5-point likert to a 4-point likert scale. One question in my dataset asks How much should be done

Re: [R] deduplication

2010-06-04 Thread Wu Gong
Please try this ## Import data id1-c(4,17,9,1,1,1,3,3,6,15,1,1,1,1,3,3,3,3,4,4,4,5,5,12,9,9,10,10) id2-c(8,18,10,3,6,7,6,7,7,16,4,5,12,18,4,5,12,18,5,12,18,12,18,18,15,16,15,16) id-data.frame(id1 = id1, id2 = id2) ## Create same structure table id - id0 - unique(id) leng - nrow(id) n - 0

Re: [R] For Loop help needed

2010-06-04 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 03.06.2010 18:18:33: One option: t - data.frame(x1=c(1,1,0,0,0,1), x2=c(0,0,0,1,0,1), Count=c(523,23,2,45,3,433)) t.sum - function(df, x1, x2) sum(df[df$x1==x1 df$x2==x2,]$Count) t.sum(t, 1, 0) # [1] 546 t.sum(t, 0, 0) # [1] 5 If this is

Re: [R] moving average on irregular time series

2010-06-04 Thread Gustaf Rydevik
Dear William and Gabor, Both solutions worked, and my problem is now solved. Many thanks to both of you! regards, Gustaf On Thu, Jun 3, 2010 at 10:23 AM, Gustaf Rydevik gustaf.ryde...@gmail.com wrote: Hi all, I wonder if there is any way to calculate a moving average on an irregular

[R] Handling of par() with variables

2010-06-04 Thread Steffen Uhlig
Hello! In order to plot multiple graphs with the same setup I use the following code-structure: ### # storing old parameter set oldpar - par(no.readonly=T) #copying old parameter set newpar - par(no.readonly=T) #adjusting parameters

Re: [R] plot polar coordinates

2010-06-04 Thread Thomas Steiner
Thank you Jim, I had a liitle off-list conversation with Greg and finally I got the solution. All the code is now on http://commons.wikimedia.org/wiki/File:Sonnenstand.png I got the workaround with my own (sun)lines function which does the shift from cartesian coordiantes to polar coordinates. An

[R] ps-output and LaTeX/DVIPS/PS2PDF - Greek letters disappear

2010-06-04 Thread Steffen Uhlig
Hello! My graphs are produced using the postscript-option in R (R version 2.10.1 (2009-12-14)). When Greek letters are used on the axis, everything looks fine in the *.ps-file. If included in a LaTeX-file and (on Ubuntu 10.04, fresh install), the Greek letters appear in the DVI- and

Re: [R] For Loop help needed

2010-06-04 Thread Allan Engelhardt
On 04/06/10 10:32, Petr PIKAL wrote: One option: t- data.frame(x1=c(1,1,0,0,0,1), x2=c(0,0,0,1,0,1), Count=c(523,23,2,45,3,433)) t.sum- function(df, x1, x2) sum(df[df$x1==x1 df$x2==x2,]$Count) [...] If this is what Khan wants so aggregate(t$Count, list(interaction(t$x1, t$x2)), sum)

Re: [R] ordinal variables

2010-06-04 Thread Joris Meys
Hi, If you look around a bit, there is some great material on the web about the powers and quirks of R. I've taught myself most of what I know from R through reading a lot and trying it out on the console. The help list is also a darn fine source of efficient code for a set of general problems.

Re: [R] General-purpose GPU computing in statistics (using R)

2010-06-04 Thread Prof Brian Ripley
On Thu, 3 Jun 2010, Ravi Varadhan wrote: Hi All, I have been reading about general purpose GPU (graphical processing units) computing for computational statistics. I know very little about this, but I read that GPUs currently cannot handle double-precision floating points Not so for a

Re: [R] Handling of par() with variables

2010-06-04 Thread Joris Meys
I think you misunderstand the working of par(). If you set new parameters, R allows you to store the old parameters simultaneously. Take a look at : par(no.readonly=T) oldpar - par(mar=c(1,1,1,1),tck=0.02) par(no.readonly=T) par(oldpar) par(no.readonly=T) So your line : newpar -

Re: [R] save in for loop

2010-06-04 Thread Joris Meys
On a side note: On Thu, May 20, 2010 at 9:43 AM, Ivan Calandra ivan.calan...@uni-hamburg.de wrote: Thanks to all of you for your answers! ... Tao, I don't understand why you have backslashes before file and after .rda. I guess it's something about regular expression, but I'm still very new

Re: [R] ps-output and LaTeX/DVIPS/PS2PDF - Greek letters disappear

2010-06-04 Thread Joris Meys
That's a problem of LateX and Ubuntu, not R : https://bugs.launchpad.net/ubuntu/+source/poppler/+bug/319495 You'll have more luck on an Ubuntu list or forum. Cheers Joris On Fri, Jun 4, 2010 at 11:47 AM, Steffen Uhlig steffen.uh...@htw-saarland.de wrote: Hello! My graphs are produced using

Re: [R] moving average on irregular time series

2010-06-04 Thread Gabor Grothendieck
On Thu, Jun 3, 2010 at 8:04 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: Replace the non-events with NA and then use na.locf from the zoo package to move the last event date up to give lastEvent. Then simply select those rows whose lastEvent date is at least 14 days ago or if the row

Re: [R] Tinn-R keyboard problem

2010-06-04 Thread dhidh23061972
I have the same problem. I also installed the older stable version (1.17.2.4, compatible version with MDI), but with no success. The keyboard worked fine before. I use Windows XP. Is there any solution? Many thanks, Carsten -- View this message in context:

[R] R with Emacs

2010-06-04 Thread dhanush
I want to know how Emacs works with R. can anyone provide me a link or manual to read? Thank you -- View this message in context: http://r.789695.n4.nabble.com/R-with-Emacs-tp2243022p2243022.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] R with Emacs

2010-06-04 Thread Joris Meys
Emacs ESS : http://ess.r-project.org/ Cheers Joris On Fri, Jun 4, 2010 at 12:55 PM, dhanush dhana...@gmail.com wrote: I want to know how Emacs works with R. can anyone provide me a link or manual to read? Thank you -- View this message in context:

Re: [R] R with Emacs

2010-06-04 Thread Romain Francois
Le 04/06/10 12:55, dhanush a écrit : I want to know how Emacs works with R. can anyone provide me a link or manual to read? Thank you http://lmgtfy.com/?q=R+emacs The first link is what you want. Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30

Re: [R] Tinn-R keyboard problem

2010-06-04 Thread Joris Meys
Tinn-R works with SDI. Make sure you have both the settings in R and the Rprofile.site correct. If the bug persists with the latest version of Tinn-R, look for help on : http://sourceforge.net/projects/tinn-r/support Cheers Joris On Fri, Jun 4, 2010 at 11:56 AM, dhidh23061972

Re: [R] ordinal variables

2010-06-04 Thread Iasonas Lamprianou
This is valuable material, thanks for all the help. I'll need many days to go through this information jason Dr. Iasonas Lamprianou Assistant Professor (Educational Research and Evaluation) Department of Education Sciences European University-Cyprus P.O. Box 22006 1516 Nicosia Cyprus Tel.:

Re: [R] string handling

2010-06-04 Thread Hadley Wickham
On Thu, Jun 3, 2010 at 4:06 PM, Wu Gong w...@mtmail.mtsu.edu wrote: Hope it helps. text - var1        var2 9G/G09    abd89C/T90 10A/T9    32C/C 90G/G      A/A x - read.table(textConnection(text), header = T) Or with the stringr package: library(stringr) str_match(x$var1, (.)/(.))

Re: [R] string handling

2010-06-04 Thread Gabor Grothendieck
This solution using strapply in gsubfn is along the same lines as the stringr solution. First we read in the data using as.is = TRUE so that we get character rather than factor columns. On the other hand, if your data is already in columns with class factor then just replace strappy(x, ...) with

[R] multinomial

2010-06-04 Thread azam jaafari
Hi I carried out multinomial logistic reg. in R by package 'nnet'. response variable has 7 level and predictors (4 variable) are classifier and continuous. I want to present results as figur but I can't. also, I read R example but I have cell grid and I can't define data.frame. please help

Re: [R] setMethod does not work in Window 7??

2010-06-04 Thread Uwe Ligges
Wrong R version? Maybe loaded some other plot definition before your experiment? Works for me in R-2.11.1. Uwe Ligges Am 03.06.2010 23:05, schrieb Fang, Jianwen: I am developing a S4 class but have had trouble to make setMethod work in Window 7. I tested an example found in the setMethod

[R] Reading newlines with read.table?

2010-06-04 Thread Allan Engelhardt
I have a text file that is UTF-16LE encoded with CRLF line endings and '@' as field separators that I want to read in R on a Linux system. Which would be fine as read.table(foo.txt, file.encoding = UTF-16LE, sep = @, ...) *except* that the data may contain the LF character which R treats as

[R] package mgcv inconsistency in help files? cyclic P-spline cs not cyclic?

2010-06-04 Thread Joris Meys
Dear all, I'm a bit stunned by the behaviour of a gam model using cyclic P-spline smoothers. I cannot provide the data, as I have about 61.000 observations from a time series. I use the following model : testgam - gam(NO~s(x)+s(y,bs=cs)+s(DD,bs=cs)+s(TT),data=Final) The problem lies with the

Re: [R] i need help about reverse axes

2010-06-04 Thread Uwe Ligges
scatterplot3d() currently does not supoort it, but you can hack an ugly workaround: If you want to do it only once ot twice: mirror your z data at mean(range of z axis) and add z.ticklabs manually (the reverse numbers) Example: x - 1:10 y - 1:10 z - 1:10 s3d - scatterplot3d(x, y, z) env -

Re: [R] package mgcv inconsistency in help files? cyclic P-spline cs not cyclic?

2010-06-04 Thread Gavin Simpson
On Fri, 2010-06-04 at 15:56 +0200, Joris Meys wrote: Dear all, I'm a bit stunned by the behaviour of a gam model using cyclic P-spline smoothers. I cannot provide the data, as I have about 61.000 observations from a time series. snip / I checked the help files ?smooth.terms, and found

Re: [R] using the design matrix to correctly configure contrasts

2010-06-04 Thread Karl Brand
Rich, Walmes, Thank you for enriching my understanding of the concept of interaction: succinctly and clearly explained. I feel i can better phrase my question, the context being much clearer now. In my case, i want to see the simple effects of changing levels of time, whilst holding

[R] Build Design Matrix with avoiding loops

2010-06-04 Thread Gildas Mazo
Dear R users, I'd like to build a simple design matrix in a efficient way. I naively wrote the code below. n = 15 k = 3 nbPerGrp = c(5,5,5) xT - list() for (i in 1:k){ xT[[i]] - rep(0, k) xT[[i]][i] - 1 } X - matrix(nrow = n, ncol = k) #design matrix for (i in

Re: [R] Build Design Matrix with avoiding loops

2010-06-04 Thread Martyn Byng
Hi, Something like x = as.factor(rep(1:k,rep(n/k,k)) X = model.matrix(~x-1) Might be what you are looking for Martyn -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Gildas Mazo Sent: 04 June 2010 16:19 To: r-help@r-project.org

[R] R plotting on linux, regardless of architecture of local machine

2010-06-04 Thread vaneet
Hello, I just installed R 2.11.0 on a 64 bit Linux machine: Red Hat Enterprise Linux Server release 5.5 (Tikanga) I am still in the learning process in terms of handling Unix and have used R on both windows and Unix before. I am wondering when running R in this linux machine is there a way to

Re: [R] Build Design Matrix with avoiding loops

2010-06-04 Thread Erik Iverson
help.search(design matrix) will lead you to ?model.matrix ... Gildas Mazo wrote: Dear R users, I'd like to build a simple design matrix in a efficient way. I naively wrote the code below. n = 15 k = 3 nbPerGrp = c(5,5,5) xT - list() for (i in 1:k){ xT[[i]] - rep(0, k)

Re: [R] reformat time from hhmm

2010-06-04 Thread Peter Moore
Thanks much for the advice. These solutions have worked great! -Pete On Thu, Jun 3, 2010 at 8:10 PM, William Dunlap wdun...@tibco.com wrote: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Peter Moore Sent: Thursday, June

Re: [R] using string as variable name in model

2010-06-04 Thread Thomas Lumley
I think you're looking for the update() function. -thomas On Thu, 3 Jun 2010, Roni Kobrosly wrote: Hi, I made a small table of strings that will serve as variable names for lm models I will run. The table looks like this: varnames numname 11

Re: [R] R Newbie, please help!

2010-06-04 Thread Dennis Murphy
Hi: The key phrase in your mail was 'data.table'. Given the size of the object, it is very likely to be a data.table, which (oddly enough) comes from package data.table. It is designed to quickly process information in very large datasets. 3M rows is an 'average' sized data.table :) Your request

Re: [R] R plotting on linux, regardless of architecture of local machine

2010-06-04 Thread Marius 't Hart
Hi, If one wants to see an X GUI from a remote application, there's no other way than to run an X server locally (the easiest way to do that on Windows is with Xming IMHO). So if you don't want an X server locally, you should not use an X GUI. R can of course also be installed on Windows,

Re: [R] Reading newlines with read.table?

2010-06-04 Thread Allan Engelhardt
I ended up pre-processing the files outside of R using a script along the lines of #!/bin/bash for f in *_table_extract_*.txt; do echo -n Processing $f... o=${f}.xz iconv -f UTF-16LE -t UTF-8 $f | \ tail -c +4 | \ perl -l012 -015 -pe 's/\n//g' | \ perl -ne

Re: [R] horizontal and vertical line with arrow in a plot

2010-06-04 Thread John Kane
# A very quick example of how to draw an arrow on a graph. plot(1:10) text(2,5, Point 5 , cex=.8) arrows(3,5, 4.5, 5) --- On Thu, 6/3/10, Roslina Zakaria zrosl...@yahoo.com wrote: From: Roslina Zakaria zrosl...@yahoo.com Subject: [R] horizontal and vertical line with arrow in a plot To:

[R] Wrong symbol rendering in plots (Ubuntu)

2010-06-04 Thread Eduardo J. Chica
Hi I am having problems with the rendering of scientific symbols (mu and degree) in my plots. Whenever I use these symbols they are rendered changed (mu is changed to the proportionality symbol and degree is changed to something resembling a gamma) in the X-device. If I make a pdf of the plot

[R] Help with iteration using while loop

2010-06-04 Thread Subodh Acharya
Hello everyone, I am trying to use while loop to iterate a function until convergence. But I am having problem when I try to use a fixed number of iterations. Say I want to use maximum iteration of 150. If the value don't converge within maximum iteration, show warning of no convergence.

Re: [R] Shapes in barplots

2010-06-04 Thread Greg Snow
The TeachingDemos package does not in any way replace the rgl package. They serve very different purposes (the TeachingDemos package does use rgl for a couple of functions). I would be very surprised if there was anything in the TeachingDemos package that would be of help in creating barplots

[R] How do I 'merge' a altered subset of a data.frame back into the same data.frame

2010-06-04 Thread dominik beck
Hi Step 1: I create a data.frame called iolm. Step 2: I create a conditional subset i_wtr. Step 3: In this subset I add 0.3 to all values in the IOLM_AST column. Step 4: Now I am looking for the best way to Œmerge¹ the altered subset back into the original iolm data.frame ## STEP 1 iolm ID

[R] R-Package FDTH

2010-06-04 Thread Enio Jelihovschi
We whish to announce the new package FDTH - Frequency Distribution Table and Associated Histogram The package contains a high level main function which easily allows the user to make a frequency distribution table and its associated histogram. The results of the table can be formatted in

Re: [R] Help with iteration using while loop

2010-06-04 Thread Steve Lianoglou
Code inline: On Fri, Jun 4, 2010 at 1:30 PM, Subodh Acharya shoeb...@gmail.com wrote: Hello everyone, I am trying to use while loop to iterate a function until convergence. But I am having problem when I try to use a fixed number of iterations. Say I want to use maximum iteration of 150. If

Re: [R] How do I 'merge' a altered subset of a data.frame back into the same data.frame

2010-06-04 Thread Marc Schwartz
On Jun 4, 2010, at 1:09 PM, dominik beck wrote: Hi Step 1: I create a data.frame called iolm. Step 2: I create a conditional subset i_wtr. Step 3: In this subset I add 0.3 to all values in the IOLM_AST column. Step 4: Now I am looking for the best way to ‘merge’ the altered subset back

Re: [R] split a row into multiple columns

2010-06-04 Thread Kevin Burnham
Thanks, that worked great, but I am having trouble generalizing it to my entire data set for some reason. I have 318 rows like this: Main Group\t1000\tMP Test\tMP Test, 1\tAudio (1, f1-qaddara.aiff)\tl (target is right word)\tl\tPressed\tl (target is right word)\tC\t3111\t\t\t\t\t and the

Re: [R] R with Emacs

2010-06-04 Thread Richard M. Heiberger
ess.r-project.org __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] string handling

2010-06-04 Thread karena
Thank you guys very much, these help!! -- View this message in context: http://r.789695.n4.nabble.com/string-handling-tp2242119p2243388.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] R plotting on linux, regardless of architecture of local machine

2010-06-04 Thread vaneet
I can try having an X server locally, but what are the other options? Isn't there anything that can be installed on Linux to be able to display graph windows in R without too much trouble? As I said I was looking for a solution to benefit many users not just me as I can't assume or expect

Re: [R] using string as variable name in model

2010-06-04 Thread Roni Kobrosly
update() works! Thank you thomas On Jun 4, 2010, at 11:47 AM, Thomas Lumley wrote: I think you're looking for the update() function. -thomas On Thu, 3 Jun 2010, Roni Kobrosly wrote: Hi, I made a small table of strings that will serve as variable names for lm models I will

[R] Convolution vector to be derived

2010-06-04 Thread Moohwan Kim
I want to generate the following outcome using convolution of two sequences. x - c(1,2,3,4,5) y - c(6,7,8,9) The resulting convolution vector is 6 19 40 70 100 94 76 45 When using convolve(), it is hard to produce the result above. Would you help me out to get that? Best regards Moohwan Kim

[R] Convolution vector to be derived

2010-06-04 Thread Moohwan Kim
Dear R-help, I want to generate the following outcome using the convolution of two sequences. x - c(1,2,3,4,5) y - c(6,7,8,9) The resulting convolution vector is 6 19 40 70 100 94 76 45 When using convolve(), it is hard to produce the result above. Would you help me out to get that? Best

Re: [R] string handling

2010-06-04 Thread Gabor Grothendieck
Here is a slightly simpler variant of the strapply solution: lapply(DF, strapply, (.)/(.), c, simplify = rbind) $var1 [,1] [,2] [1,] G G [2,] A T [3,] G G $var2 [,1] [,2] [1,] C T [2,] C C [3,] A A On Fri, Jun 4, 2010 at 8:08 AM, Gabor Grothendieck ggrothendi...@gmail.com

[R] Creating a maxtrix from conditional prints

2010-06-04 Thread EM
Hi guys :) I'm dealing with this problem, perhaps conceptually not that complex, but still - I'm stuck. Two columns, values 1x10, only integers. I want to check when the first column's index is identical to the second's (and vice versa). If that's true, I want to add a further column with value

Re: [R] split a row into multiple columns

2010-06-04 Thread Dennis Murphy
Hi: Maybe something like this? txt - Main Group\t1000\tMP Test\tMP Test, 1\tAudio (1, f1-qaddara.aiff)\tl (target is right word)\tl\tPressed\tl (target is right word)\tC\t3111\t\t\t\t\t txtdf - as.data.frame(rbind(txt, txt, txt, txt, txt)) # create toy data frame res -

[R] sem R: singular and Could not compute QR decomposition of Hessian

2010-06-04 Thread sanchez ana
Can somebody help me with the following issue (SEM in R), please:   When I run the model (includes second order models) in R, it gives me the following:   1)   In sem.default(ram = ram, S = S, N = N, param.names = pars, var.names = vars,  :   Could not compute QR decomposition of Hessian.

Re: [R] R plotting on linux, regardless of architecture of local machine

2010-06-04 Thread Marc Schwartz
On Jun 4, 2010, at 1:53 PM, vaneet wrote: I can try having an X server locally, but what are the other options? Isn't there anything that can be installed on Linux to be able to display graph windows in R without too much trouble? As I said I was looking for a solution to benefit many

Re: [R] Convolution vector to be derived

2010-06-04 Thread Allan Engelhardt
On the contrary: it is trivial to produce the result. x - c(1,2,3,4,5) y - c(6,7,8,9) convolve(x, rev(y), type=open) # [1] 6 19 40 70 100 94 76 45 Try help(convolve). Allan On 04/06/10 19:21, Moohwan Kim wrote: Dear R-help, I want to generate the following outcome using the

Re: [R] R plotting on linux, regardless of architecture of local machine

2010-06-04 Thread vaneet
So just so I understand properly, if there are multiple users connecting to this remote linux machine in which I installed R and lets just say they all have Windows machines. To view plots they would all need to have an SSH client and an X server installed on their local machine to do this?

Re: [R] R plotting on linux, regardless of architecture of local machine

2010-06-04 Thread Erik Iverson
vaneet wrote: So just so I understand properly, if there are multiple users connecting to this remote linux machine in which I installed R and lets just say they all have Windows machines. To view plots they would all need to have an SSH client and an X server installed on their local

Re: [R] Wrong symbol rendering in plots (Ubuntu)

2010-06-04 Thread Ben Bolker
Eduardo J. Chica ejchica at gmail.com writes: Hi I am having problems with the rendering of scientific symbols (mu and degree) in my plots. Whenever I use these symbols they are rendered changed (mu is changed to the proportionality symbol and degree is changed to something resembling a

Re: [R] R plotting on linux, regardless of architecture of local

2010-06-04 Thread Ted Harding
On 04-Jun-10 20:26:50, vaneet wrote: So just so I understand properly, if there are multiple users connecting to this remote linux machine in which I installed R and lets just say they all have Windows machines. To view plots they would all need to have an SSH client and an X server installed

Re: [R] R plotting on linux, regardless of architecture of local

2010-06-04 Thread vaneet
Thanks for explaining it in detail, that really helps. -- View this message in context: http://r.789695.n4.nabble.com/R-plotting-on-linux-regardless-of-architecture-of-local-machine-tp2243391p2243757.html Sent from the R help mailing list archive at Nabble.com.

[R] subsetting a dataframe

2010-06-04 Thread yjmha69
Hi there, a-data.frame(c(1,2,2,5,9,9),c(A,B,C,D,E,F)) names(a)-c(x1,x2) max(table(a$x1)) [1] 2 The above shows the max count for x1 is 2, which is correct. But we can't tell there are 2 groups that meet this criteria: 2,2 and 9,9. I then want to extract the records that has the

[R] tapply help

2010-06-04 Thread Mark Ebbert
Dear R gurus, I am trying perform what I believe will be a pretty simple task, but I'm struggling to figure out how to do it. I have two vectors of the same length, the first is numeric and the second is factor. I understand that tapply is perfect for applying a function to the numeric vector

[R] fixed intercept

2010-06-04 Thread array chip
Hi, is it possible to specify a constant intercept (based on prior knowledge) in linear regression using lm()? Thanks John __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Your message to R-help awaits moderator approval

2010-06-04 Thread yjmha69
What filter rule is violated? So frustrated, why can't I post question! - Original Message From: r-help-boun...@r-project.org r-help-boun...@r-project.org To: yjmh...@yahoo.com Sent: Fri, June 4, 2010 12:28:37 PM Subject: Your message to R-help awaits moderator approval Your mail to

Re: [R] Help with iteration using while loop

2010-06-04 Thread Steve Lianoglou
Hi Subodh, Minor note: please keep replies on list so everyone benefits from answers/questions. Now: On Fri, Jun 4, 2010 at 2:49 PM, Subodh Acharya shoeb...@gmail.com wrote: Thanks a lot Steve, It worked. I appreciate. But I have another question, may be thats trivial. Say, it doesn't

Re: [R] Wrong symbol rendering in plots (Ubuntu)

2010-06-04 Thread Peter Langfelder
On Fri, Jun 4, 2010 at 1:44 PM, Ben Bolker bol...@ufl.edu wrote: Eduardo J. Chica ejchica at gmail.com writes: Hi I am having problems with the rendering of scientific symbols (mu and degree) in my plots. Whenever I use these symbols they are rendered changed (mu is changed to the

Re: [R] Wrong symbol rendering in plots (Ubuntu)

2010-06-04 Thread Erik Iverson
plot(c(1:10)) when put into a pdf file via pdf() device, will display incorrect symbols in linux pdf viewers (evince, okular). The circles (o) become q, literally the letter q, and lose colors. This issue is already in the Notes section of ?pdf. It remains to be seen if the OP's problem

Re: [R] Wrong symbol rendering in plots (Ubuntu)

2010-06-04 Thread Peter Langfelder
This issue is already in the Notes section of ?pdf.  It remains to be seen if the OP's problem was this exact one, since they didn't specify an example. aahhh, thank you for pointing this out. I never noticed this note. Peter __

Re: [R] subsetting a dataframe

2010-06-04 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of yjmha69 Sent: Friday, June 04, 2010 12:28 PM To: R-help@r-project.org Subject: [R] subsetting a dataframe Hi there, a-data.frame(c(1,2,2,5,9,9),c(A,B,C,D,E,F))

Re: [R] Your message to R-help awaits moderator approval

2010-06-04 Thread Gabor Grothendieck
This has happened to me too. The last time it occurred I was replying to another post and on my second attempt I deleted the replied-to portion and reposted just my portion and it worked. On Fri, Jun 4, 2010 at 4:35 PM, yjmha69 yjmh...@yahoo.com wrote: What filter rule is violated? So

Re: [R] R plotting on linux, regardless of architecture of local machine

2010-06-04 Thread Marc Schwartz
On Jun 4, 2010, at 3:26 PM, vaneet wrote: So just so I understand properly, if there are multiple users connecting to this remote linux machine in which I installed R and lets just say they all have Windows machines. To view plots they would all need to have an SSH client and an X server

[R] plotting a dataset with median 0

2010-06-04 Thread Georg Ehret
Dear R community, [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented,

[R] plotting a dataset with median 0

2010-06-04 Thread Georg Ehret
Dear R community, I am working on a dataset that has median 0 (due to many 0 entries) for my principal variable of interest (40 entries in total). I would like to plot a graph of this variable to show it visually, but have a hard time: boxplots are not informative (because median 0).

[R] What is the largest in memory data object you've worked with in R?

2010-06-04 Thread Nathan Stephens
For me, I've found that I can easily work with 1 GB datasets. This includes linear models and aggregations. Working with 5 GB becomes cumbersome. Anything over that, and R croaks. I'm using a dual quad core Dell with 48 GB of RAM. I'm wondering if there is anyone out there running jobs in the

[R] Ignoring missing elements in data.frame()

2010-06-04 Thread Scott Chamberlain
Hello, I am trying to make a data frame from many elements after running a function which creates many elements, some of which may not end up being real elements due to errors or missing data. For example, I have the following three elements p1s, p2s, and p3s. p9s did not generate the same data as

[R] 380x380 dataframe to list

2010-06-04 Thread Nick Matzke
Hi, This can't be hard, but I can't find the solution. I have a 380x380 data frame of numbers. I would like to turn it into a single column so I can do e.g. hist and mean on it without writing my own function. There must be a simple function for this, but I'm stumped -- reshape, dim, etc.

Re: [R] 380x380 dataframe to list

2010-06-04 Thread Jorge Ivan Velez
Hi Nick, Try unlist(yourdataframe). HTH, Jorge On Fri, Jun 4, 2010 at 8:47 PM, Nick Matzke wrote: Hi, This can't be hard, but I can't find the solution. I have a 380x380 data frame of numbers. I would like to turn it into a single column so I can do e.g. hist and mean on it without

Re: [R] Help with iteration using while loop

2010-06-04 Thread Subodh Acharya
Hi Steve, Actually I figured that out after I emailed you but I forgot to email you before I left office. Anyway thanks a lot.And thanks for the note. I'll do that from now on. Subodh On Fri, Jun 4, 2010 at 4:54 PM, Steve Lianoglou mailinglist.honey...@gmail.com wrote: Hi Subodh, Minor

Re: [R] 380x380 dataframe to list

2010-06-04 Thread Peter Langfelder
c(as.matrix(data)) will not do it? Peter On Fri, Jun 4, 2010 at 5:47 PM, Nick Matzke mat...@berkeley.edu wrote: Hi, This can't be hard, but I can't find the solution.  I have a 380x380 data frame of numbers.  I would like to turn it into a single column so I can do e.g. hist and mean on it

  1   2   >