Re: [R] What is the most cost effective hardware for R?

2012-05-10 Thread Hugh Morgan
Thank you all for the help. We have decided against using for example Amazon cloud for basicly paperwork issues. We have money available now for buying kit, this may not be available for buying "services", and may not be available next year, or the next. We shall certainly consider it as a f

Re: [R] Dotchart showing mean and median by group

2012-05-10 Thread maxbre
hi all I have another question reated to the dotchart: is it possible by means of par() to set a logaritmic scale? If yes, how ? and if not, any alternative solution? thanks -- View this message in context: http://r.789695.n4.nabble.com/Dotchart-showing-mean-and-median-by-group-tp4619597p46226

Re: [R] reception of (Vegan) envfit analysis by manuscript reviewers

2012-05-10 Thread Gavin Simpson
On Wed, 2012-05-09 at 15:51 -0600, Matt Bakker wrote: > I'm getting lots of grief from reviewers about figures generated with > the envfit function in the Vegan package. Has anyone else struggled to > effectively explain this analysis? If so, can you share any helpful > tips? > > The most recent c

Re: [R] Fwd: Finding local maxima on a loess surface

2012-05-10 Thread David Winsemius
On May 10, 2012, at 12:10 AM, Diego Rojas wrote: -- Forwarded message -- From: Diego Rojas Date: Wed, May 9, 2012 at 3:05 PM Subject: Re: [R] Finding local maxima on a loess surface To: David Winsemius Thanks again, would you please try to ilustrate further your point with

Re: [R] Dotchart showing mean and median by group

2012-05-10 Thread David Winsemius
On May 10, 2012, at 2:24 AM, maxbre wrote: hi all I have another question reated to the dotchart: is it possible by means of par() to set a logaritmic scale? If yes, how ? and if not, any alternative solution? Looking at the dotchart code it appears to me that the log parameter to plot.

Re: [R] Dotchart showing mean and median by group

2012-05-10 Thread David Winsemius
On May 10, 2012, at 5:03 AM, David Winsemius wrote: On May 10, 2012, at 2:24 AM, maxbre wrote: hi all I have another question reated to the dotchart: is it possible by means of par() to set a logaritmic scale? If yes, how ? and if not, any alternative solution? Looking at the dotchart

Re: [R] There must be a better way to do this

2012-05-10 Thread Jim Lemon
On 05/10/2012 02:17 AM, David Perlman wrote: Thanks, that is very helpful. I agree that my example plot was a bit cluttered, but this is what I actually wanted: http://brainimaging.waisman.wisc.edu/~perlman/data/MNPT1T2_h_unp_raw.pdf I just needed to get example code out quickly. You get bette

[R] bigmemory

2012-05-10 Thread ya
Hi all, I have a question about using bigmemory package. Here is my code: > x=read.big.matrix("acc3.dat",backingfile="acc3.bin",descriptorfile="acc3.desc",type="double") Error in filebacked.big.matrix(nrow = nrow, ncol = ncol, type = type, : A big.matrix must have at least one row and one

Re: [R] [R-sig-eco] reception of (Vegan) envfit analysis by manuscript reviewers

2012-05-10 Thread Jari Oksanen
On 10/05/2012, at 11:45 AM, Gavin Simpson wrote: > On Wed, 2012-05-09 at 15:51 -0600, Matt Bakker wrote: >> I'm getting lots of grief from reviewers about figures generated with >> the envfit function in the Vegan package. Has anyone else struggled to >> effectively explain this analysis? If so,

[R] bigmemory

2012-05-10 Thread ya
Hi all, In addition, I am planning to do a multiple imputation with MICE package using the data read by bigmemory package. So usually, the multiple imputation code is like this: > imp=mice(data.frame,m=50,seed=1234,print=F) the data.frame is required. How can I change the big.matrix class g

[R] stop calculation in a function

2012-05-10 Thread jeff6868
Hi dear R-users, I have a question about a function I'm trying to improve. How can I stop the function calculation at the last numeric value of my data? The problem is that the end of my data contains missing values (NAs). And the aim of my function is to compare the first numeric value with the n

Re: [R] Interweaving of two datasets

2012-05-10 Thread lunarossa
it doesn't work. Find attached what I need explained in xls. Thank you very very much! http://r.789695.n4.nabble.com/file/n4622912/interweaving_of_2_datasets.xls interweaving_of_2_datasets.xls -- View this message in context: http://r.789695.n4.nabble.com/Interweaving-of-two-datasets-tp4608505p4

[R] Classification of Cluster-Correlated data

2012-05-10 Thread Yohann R
Dear R-Help, I'm dealing with a supervized binary classification issue. My dataset is composed of 1500 individuals, living in 600 households. I have approximately 4000 variables to classify my subjects as "infected/uninfected". I was wondering how would it be possible to account for the hierarchi

Re: [R] outlier identify in qqplot

2012-05-10 Thread agent dunham
Sorry, but I need the same and i don't understand your help. So, after fitting my lm model, how can i identify my data? I was trying the following, but it doesn't work. /identify(qnorm(c(0.25, 0.75)),quantile(rstandard(mymodel)[!is.na(rstandard(mymodel))], c(0.25, 0.75)),row.names(mydata)) warni

Re: [R] stop calculation in a function

2012-05-10 Thread Sarah Goslee
Well, if i goes from 2 to length(x) and you try to access x[i+1], of course odd things will happen. Why not construct the loop to (length(x)-1) instead, so that x[i+1] is defined. Sarah On Thu, May 10, 2012 at 5:14 AM, jeff6868 wrote: > Hi dear R-users, > > I have a question about a function I

Re: [R] outlier identify in qqplot

2012-05-10 Thread R. Michael Weylandt
Reproducible example? https://github.com/hadley/devtools/wiki/Reproducibility Michael On Thu, May 10, 2012 at 6:31 AM, agent dunham wrote: > Sorry, but I need the same and i don't understand your help. > > So, after fitting my lm model, how can i identify my data? I was trying the > following, b

[R] Modifying R package code

2012-05-10 Thread Brian Smith
Hi, I was trying to change some code in an existing package. I downloaded the source package (say 'package_xx') from CRAN, and changed the R code provided in the /package_xx/R/xx.R. I then saved the changes and did the R CMD INSTALL -l /path to modified package/. Do I need to do something else be

Re: [R] Axes value format

2012-05-10 Thread Vihan Pandey
On 08/05/2012, David Winsemius wrote: > > On May 8, 2012, at 2:23 PM, Vihan Pandey wrote: > >> On 8 May 2012 19:47, John Kane wrote: >>> Quite likely, but we need to know what you are doing and what >>> graphics package you are using. >>> >>> PLEASE do read the posting guide >>> http://www.R-proj

Re: [R] Problem with SQLDF - Error in sqliteExecStatement(con, statement, bind.data) : RS-DBI driver: (error in statement: no such table:

2012-05-10 Thread Shivam
Thanks Gabor, Jim, POSIXct is working fine :) Regards, Shivam On Thu, May 10, 2012 at 5:22 AM, Gabor Grothendieck wrote: > On Wed, May 9, 2012 at 7:24 PM, Shivam wrote: > > Ohh ... Thanks Gabor. I have a few related queries then, kindly have a > look: > > > > 1. Does it only hinder the sqldf p

[R] additional axis, different scale

2012-05-10 Thread pannigh
Dear list, I am looking for a possibility to present results in a more graphical way by adding an axis. But I have trouble relating my data to the added axis. Imagine the following example: a <- c(10, 20, 30, 40) b <- c(50, 250, 500, 600) ba <- b/a par(las=1, mar=c(5,5,.5,5)) plot(a,b, type

Re: [R] Axes value format

2012-05-10 Thread Vihan Pandey
On 08/05/2012, John Kane wrote: > Actually I meant a working example and some data (See ?dput for a handy way > to supply data) > > It is also a good idea to include the information from sessionInfo() > > > I think David W has a good approach. > > Otherwise you might just want to write the axis y

Re: [R] Axes value format

2012-05-10 Thread Vihan Pandey
On 08/05/2012, arun wrote: > Hi Vihan, > > The link below might be helpful. > > > (http://stackoverflow.com/questions/3415097/controlling-number-formatting-at-axis-of-r-plots) Thanks, the xaxt parameter in plot() solved the problem. Thanks and Cheers! - vihan > > A.K. > > > > > > > > - Ori

Re: [R] stop calculation in a function

2012-05-10 Thread Berend Hasselman
On 10-05-2012, at 12:59, Sarah Goslee wrote: > Well, if i goes from 2 to length(x) and you try to access x[i+1], of > course odd things will happen. Why not construct the loop to > (length(x)-1) instead, so that x[i+1] is defined. > The reference to x[i+1] in a commented line so I don't think

Re: [R] stop calculation in a function

2012-05-10 Thread jeff6868
Thank you for your reply sarah. Well actually I don't try to access x[i+1]. The line where you saw it starts with #. It was just try I wanted to keep (sorry I should have removed it before posting). But I ask him to access to the next value if conditions in the loop are not verified (restart the c

Re: [R] additional axis, different scale

2012-05-10 Thread Jim Lemon
On 05/10/2012 09:37 PM, pannigh wrote: Dear list, I am looking for a possibility to present results in a more graphical way by adding an axis. But I have trouble relating my data to the added axis. Imagine the following example: a<- c(10, 20, 30, 40) b<- c(50, 250, 500, 600) ba<- b/a par(las=1,

Re: [R] additional axis, different scale

2012-05-10 Thread John Kane
I don't think there is any other way. On the other hand, most gurus suggest that a dual scales on a graph are not a good thing. What about using a two panel graph? Quick rejigging of your code : = a <- c(10, 20, 30, 40) b <- c(50

Re: [R] Dotchart showing mean and median by group

2012-05-10 Thread Gabor Grothendieck
On Thu, May 10, 2012 at 2:24 AM, maxbre wrote: > hi all > > I have another question reated to the dotchart: is it possible by means of > par() to set a logaritmic scale? > If yes, how ? and if not, any alternative solution? > 1. This is getting increasingly complicated as new requirements are add

[R] plotting legend-grob with grid.layout

2012-05-10 Thread Johannes Radinger
Hi, I am using ggplot2 and arrange differnet plots into one viewport by dividing it into rows and columns: pushViewport(viewport(layout = grid.layout(nrow=2,ncol=2,widths = unit(c(50, 50), "mm"),heights = unit(c(50, 50), "mm" with following function I can extract the legend of a previously

Re: [R] additional axis, different scale

2012-05-10 Thread David Winsemius
On May 10, 2012, at 8:07 AM, John Kane wrote: I don't think there is any other way. There is: a <- c(10, 20, 30, 40) b <- c(50, 250, 500, 600) ba <- b/a par(las=1, mar=c(5,5,.5,5)) plot(a,b, type="b", pch=22, cex=2, col=4, lwd=2, ylim=c(0,650), xlim=c(0,45)) par(new=TRUE) plot(a,ba,ty

Re: [R] Modifying R package code

2012-05-10 Thread Duncan Murdoch
On 12-05-10 7:38 AM, Brian Smith wrote: Hi, I was trying to change some code in an existing package. I downloaded the source package (say 'package_xx') from CRAN, and changed the R code provided in the /package_xx/R/xx.R. I then saved the changes and did the R CMD INSTALL -l /path to modified pa

Re: [R] stop calculation in a function

2012-05-10 Thread Sarah Goslee
On Thu, May 10, 2012 at 8:02 AM, jeff6868 wrote: > Thank you for your reply sarah. > Well actually I don't try to access x[i+1]. The line where you saw it starts > with #. It was just try I wanted to keep (sorry I should have removed it > before posting). Sorry, I should really have more coffee b

Re: [R] file path

2012-05-10 Thread Upton, Stephen (Steve) (CIV)
Why not just construct a valid file name and use that in cat? You can then use file.path to join paths together if you want to write to a specific location, as in your example. steve -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf O

Re: [R] additional axis, different scale

2012-05-10 Thread John Kane
Oh, yes of course. Thanks. I really don't like dual plots. I ran into one a few days ago that looked to me to be very dubious but I don't have the raw data to replot it in another form. It's a side issue so I'm not going to bother about it but is annoyed me. John Kane Kingston ON Canada

Re: [R] file path

2012-05-10 Thread Wincent
As I said, the file name is derived automatically from text processing. Thanks all the same. On 10 May 2012 20:35, Upton, Stephen (Steve) (CIV) wrote: > Why not just construct a valid file name and use that in cat? You can then use > file.path to join paths together if you want to write to a spec

Re: [R] stop calculation in a function

2012-05-10 Thread jeff6868
Thanks for your answer too Berend. Yes you're right about x[i+1]. You answered juste before me. Well your idea of declaring all in numeric is great. It avoids my problem. But actually I also have small missing data gaps in the rest of my data (in the middle of numeric values). And one of the aim of

Re: [R] stop calculation in a function

2012-05-10 Thread Sarah Goslee
You're moving the goal posts. If you need to deal with internal as well as terminal NA values in a particular way, it would help to have told us that up front. Please give us some sample data that illustrates what you're really trying to work with, and a full explanation of what you need to accomp

Re: [R] file path

2012-05-10 Thread jim holtman
Has any mentioned ?make.names On Thu, May 10, 2012 at 8:39 AM, Wincent wrote: > As I said, the file name is derived automatically from text processing. > Thanks all the same. > > On 10 May 2012 20:35, Upton, Stephen (Steve) (CIV) wrote: >> Why not just construct a valid file name and use that i

Re: [R] Taking a lead in panel data

2012-05-10 Thread Apoorva Gupta
I have tried the diff and lag function. I have given an example below. Diff gives me a$var2.shift. I want a$var2.noshift, i.e. var^(t+2)-var^(t) should stay in the row with year=t. Diff shifts it to the t+2 row. > a <- data.frame(c(rep(2,5), rep(3,5)), c(2005:2009, 2004:2008), c(NA,10,34,23,12, 2

[R] Split the work for many cores

2012-05-10 Thread Alaios
Dear all, I am using my code the vgram.matrix of packets fields. I have around 500 matrices that I need to pass inside that function and then plot those results. Even though my system has 16 cores is quite clear that I am only using one of those. Would it be able to skip these 500 "tasks" to the

Re: [R] additional axis, different scale

2012-05-10 Thread pannigh
Hi Jim, hi John, thank you very much for your tips. The "plotrix" package solves the problem! However, thank you also for the advice that my way of plotting the data might not be the best. I will think about it. So once again thanx ! -- View this message in context: http://r.789695.n4.nabble.c

[R] envfit output (vegan package) - not sure what it means

2012-05-10 Thread cernst
I'm pretty new to R and would appreciate some help interpreting the output of a function that was recommended to me. I've used the *envfit *function in the vegan package to plot vectors of four climate variables onto a species matrix ordination. The output indicates that only a single variable (m

Re: [R] registry vulnerabilities in R

2012-05-10 Thread Zhou Fang
What about using a Portable Apps style packaging of R? That might solve some of the issues. -- View this message in context: http://r.789695.n4.nabble.com/registry-vulnerabilities-in-R-tp4619217p4623388.html Sent from the R help mailing list archive at Nabble.com. ___

[R] Output result to a csv file

2012-05-10 Thread eddie smith
Hi guys, I am applying linear regression model using lm, generate the residual and then need to output the result to a csv file. Here is my script: maxtempstation1.lm = lm( Year ~ station1, data=opencsv) maxstation1.res = resid(maxstation1.lm); maxstation1.res write.csv(maxtempstation1.res, file="

Re: [R] envfit output (vegan package) - not sure what it means

2012-05-10 Thread Jari Oksanen
cernst mail.mcgill.ca> writes: > > I'm pretty new to R and would appreciate some help interpreting the output of > a function that was recommended to me. > > I've used the *envfit *function in the vegan package to plot vectors of four > climate variables onto a species matrix ordination. The o

Re: [R] Random resampling of columns in species association matrices

2012-05-10 Thread mariasve
Hi David, Thank you for your suggestions. I am quite the beginner at R and don’t understand how to actually implement your suggestion and am hoping for some further advice on that, if possible. This is a subset of my data. Rows are host species, and columns parasite species. Three of the parasite

Re: [R] stop calculation in a function

2012-05-10 Thread jeff6868
I tried your proposition Sarah (I was answering to Berend when you posted your answer). Well it seems to work! I just had to add afterwords a line to have my NAs again. I converted values = 0 by NA (numeric() in the function did the contrary for the calculation): mydata[mydata==0] <- NA At firs

[R] Fwd: Re: need help in R

2012-05-10 Thread Leah Mathibela
> i need help in my coding > the first line and the second line works and the ggplot works > when i have a code like this and i want to fetch a map and saves it to > a directory how can i put it > because it gives me an error message > Error in load(GGemz) : bad 'file' argument > > GGemz <- ggoo

Re: [R] Interweaving of two datasets

2012-05-10 Thread Rui Barradas
Hello, What doesn't work, exactly? I can only see two things: 1. The order of the columns is different, first data.frame in merge instruction comes first. Solution: reverse the order of data.frames in merge. 2. The order of the rows is different, the merge function orders it's output by the c

Re: [R] outlier identify in qqplot

2012-05-10 Thread agent dunham
Find the data attached, http://r.789695.n4.nabble.com/file/n4623493/mydata.txt mydata.txt The model would be /lmmodel <- lm(log(vdep) ~ v1 + sqrt(v2) + v3 +v5 + v6 + v7 + v8 + v9 + v10, data = mydata)/ Thanks again, u...@host.com -- View this message in context: http://r.789695.n4.nabble.

[R] Using valgrind to debug R, extracting column of a mts object causes valgrind to crash

2012-05-10 Thread Jouni Helske
Dear all, I'm trying to debug my R package with valgrind, but I cannot get past the point where I load make the data, as valgrind crashes when trying to extract a single time series object of a multivariate mts object. I'm using R 2.15.0 with platform x86_64-redhat-linux-gnu (64-bit). The valgrin

[R] Problem with factors in NMDS and Envfit

2012-05-10 Thread rodrock
Hi everybody, thanks in advance for your help! I am working with genetic data performing an NMDS to visualize the genetic differentiation of individuals from different species and populations in different site conditions (site variables are all factors), and actually genetic data also. The data b

Re: [R] Interweaving of two datasets

2012-05-10 Thread lunarossa
Hi Ruri, sorry for my vagueness. The problem is not the order. I tried to merge the datasets as you wrote. The result is that when I input: table(phone) The output is: 0 And this happens for all the variables. -- View this message in context: http://r.789695.n4.nabble.com/Interweaving-of-two

Re: [R] Automating R for Hypothesis Testing

2012-05-10 Thread meredith
Rui- Thanks this definitely helps, just one quick question. How would you code the values of chi-fm and chi-fms to change based on the degrees of freedom of each model H(i)? Meredith Rui Barradas wrote > > Hello, > > Yes, it does help. Now we can see your data and what you're doing. > What f

Re: [R] Dotchart showing mean and median by group

2012-05-10 Thread maxbre
thank you all for the high level contributions and the very helpful feedback; I think I have now enogh material to study for months: what a good lesson learned! cheers max -- View this message in context: http://r.789695.n4.nabble.com/Dotchart-showing-mean-and-median-by-group-tp4619597p46235

[R] png support in R on linux

2012-05-10 Thread Unger, Kristian, Dr.
Hi there, I am sure this question has been posted a couple times before but I could not find a good solution on the web. Is there any way to get png() support in R on SUSE linux? We want to run GenePattern on that server and some workflows use R scripts plotting into pngs. Best wishes Kristia

Re: [R] Interweaving of two datasets

2012-05-10 Thread John Kane
I don't quite follow what you are doing. Here is what Rui was suggesting using your sample data === dat1 <- structure(list(name = structure(c(4L, 3L, 5L, 2L, 1L, 6L), .Label = c("Andy", "Bruce", "Ella", "John", "Luna", "Morgana"),

[R] converting raster image

2012-05-10 Thread Mintewab Bezabih
Dear R users, I was wondering how I can convert a raster image (that made R through interpolation) into an ascii or csv format? this is the last line of my command p <- interpolate(r, tpsfit) So p is my raster file which I want to convert into ascii or csv Many thanks Regards Mintewab

[R] How to capture NA values

2012-05-10 Thread Alaios
Dear all, I would like to capture the NA values as produced from my code the str over the return values return int 61  int 65  int 69  int 73  int 101  int NA  int NA it looks like that I am getting returned some integer values that are NA and I want to have an if statement for catching those w

Re: [R] How to capture NA values

2012-05-10 Thread Berend Hasselman
On 10-05-2012, at 17:16, Alaios wrote: > Dear all, > I would like to capture the NA values as produced from my code > the str over the return values return > > int 61 > int 65 > int 69 > int 73 > int 101 > int NA > int NA > > it looks like that I am getting returned some integer values th

[R] disagreement in loglikelihood and deviace in GLM with weights leads to different models selected using step()

2012-05-10 Thread Marian K Talbert
In species distribution modeling where one uses a large sample of background points to capture background variation in presence\pseudo-absence or use\available models (0\1 response) it is frequently recommended that one weight the data so the sum of the absence weights is equal to the sum of pr

Re: [R] Automating R for Hypothesis Testing

2012-05-10 Thread Rui Barradas
Hello, I'm glad it helped. As for your second question, I don't know, but I'm not very comfortable with the way you're doing things. Why subtract the coefficients of model 1 from model 2? And why the dummy? Why set model 1 to zero? Isn't it better to use anova's F? After all, it's designed for i

Re: [R] Output result to a csv file

2012-05-10 Thread Rui Barradas
Hello, Try station <- colnames(opencsv)[-1] mat <- matrix(0, nrow=length(station), ncol=nrow(opencsv)) dimnames(mat) <- list(station, opencsv$Year) for(st in station){ model <- lm(Year~opencsv[, st], data=opencsv) mat[st, ] <- residuals(model) } write.csv(mat, "opencsv.csv") Hop

Re: [R] Interweaving of two datasets

2012-05-10 Thread Rui Barradas
With the sample data and the merge as above, table(res2$phone) 454 2123 2342 9876 56775 87678 2 2 3 3 4 1 with(res2, table(name, request)) request name book cigarettes drink food paper Andy 0 1 00

Re: [R] How to capture NA values

2012-05-10 Thread David Winsemius
On May 10, 2012, at 11:16 AM, Alaios wrote: Dear all, I would like to capture the NA values as produced from my code the str over the return values return int 61 int 65 int 69 int 73 int 101 int NA int NA it looks like that I am getting returned some integer values that are NA and I w

[R] averaging two tables (rows with columns)

2012-05-10 Thread Kristi Glover
Hi R user,I am struggling to figure out on how I can calculate the average from the two tables in R. Any one can help me? really your help would be grateful- I am spending so much time to figure it out. It should not be so hard, I think. I have very big data but I have created a hypothetical d

Re: [R] averaging two tables (rows with columns)

2012-05-10 Thread John Kane
Kristi, Your data has come through in a totally unreadable layout. Have a look at ?dput as a handy way to present sample data. Just run dput(mydata), copy the output and paste into the email. John Kane Kingston ON Canada > -Original Message- > From: kristi.glo...@hotmail.com > Sent:

[R] PLS Q2 value?

2012-05-10 Thread Charles Determan Jr
Greetings R users, My interest in the Q2cum score comes my endeavor to replicate SIMCAP PLS-DA analysis in R.  I use the exact same dataset.  After doing the analysis in R, I can get the exact same R2Ycum.  However, the Q2cum is significantly off.  Adding the Q2cum of the 1st and 2nd component com

Re: [R] averaging two tables (rows with columns)

2012-05-10 Thread Petr PIKAL
Hi as already mentioned your data can not be deciphered. Use dput(table1) for sending usable data. >From what you describe probably ?aggregate can be used. But without suitable data you hardly get any advice. Regards Petr > > > Hi R user,I am struggling to figure out on how I can calculate

Re: [R] Help with stemDocument

2012-05-10 Thread Alekseiy Beloshitskiy
Hi Triss, If you need to stem just one text in the Corupus use a[[n]]<-stemDocument Best, -Alex From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] on behalf of Triss.Ashton [triss.ash...@unt.edu] Sent: 02 May 2012 21:09 To: r-help@r-projec

Re: [R] Matrix heatmap

2012-05-10 Thread Petr PIKAL
Hi what is wrong with heatmap(as.matrix(test), col=my.colors(25)) with test from your dput Regards Petr > The heat map generated the correct result: > > library(gplots) > arq <-read.table("l") > matrix_l <-data.matrix(arq) > my.colors <- > colorRampPalette(c > ("gray0","gray10","gray20","gr

[R] Outcome~predictor model evaluation, repeated measurements

2012-05-10 Thread rad mac
Dear all, I have simple question regarding how to fit a model (i.e. linear) to the data. Say I have 10 subjects with different phenotypes (dependent var Y, identical for a particular subject) and one predictor variable measured 3 times for each subject (X). By other words: Y Subj X 1 1 1.2 1 1

Re: [R] averaging two tables (rows with columns)

2012-05-10 Thread Kristi Glover
Hi John , Petr and R users I am sorry that my data was not readable formate in the last email. Again I am trying to send it. hope this time, that table can be readable.As I mentioned earlier that I was struggling to figure out on how I can calculate the average from the two tables in R. Any on

[R] FW: averaging two tables (rows with columns)

2012-05-10 Thread Kristi Glover
Hi R-usuar, I still find the table is not in readable formate. I now forwarded the email.hope it works. I sent it to my account . It was perfect- but when I sent it to R help- then it comes with unreadable formate. This is my last try. If not, then I will try to do in Excel manually. cheers, F

Re: [R] FW: averaging two tables (rows with columns)

2012-05-10 Thread Sarah Goslee
Kristi, Several people have already suggested you use dput() to provide your data. In R, dput(table1) dput(table2) Then copy and paste the output of those commands into your email. There's no way to reliably copy and paste your raw data: using dput() is the best way to provide it. Sarah On Th

Re: [R] FW: averaging two tables (rows with columns)

2012-05-10 Thread Kristi Glover
oppps, Now I used 'dput' function. Again I am sending. I am so sorry for inconvenience. HI R userI am sorry that my data was not readable formate in the last email. Agin I am trying to send it. hope this time, that table can be readable.As I mentioned earlier that I was struggling to figure

Re: [R] converting raster image

2012-05-10 Thread R. Michael Weylandt
write.csv() perhaps? I'm not sure what the csv of a raster image is though... What does p look like? str(p) will be important -- if the raster codes (RGB values) are in lists or 3D arrays or something more complex (i.e., if no grayscale) you might need to put them in multiple files. Hope this hel

Re: [R] Split the work for many cores

2012-05-10 Thread R. Michael Weylandt
library(parallel) # Requires R >=2.14 mclapply # a parallelized lapply() You can process in parallel, but I'm not sure if it's safe to do graphics in parallel: someone else will need to chime in about that. Best, Michael On Thu, May 10, 2012 at 9:12 AM, Alaios wrote: > Dear all, > I am using my

Re: [R] FW: averaging two tables (rows with columns)

2012-05-10 Thread John Kane
Kristi The tables , if read in edit mode are vagely readable but please just do as Petr and I suggest. Use the dput command. If you have the table in an R data.frame all you need to do is use the command dput(mytable) I read your two tables into R and did that . Note I called them dat1 & dat2.

Re: [R] outlier identify in qqplot

2012-05-10 Thread R. Michael Weylandt
Do you want a qqnorm() instead of a qqplot() ? [Reproducibility also involves posting the code you used that lead to the error / warning] This seems to work for me: # mydata <- source("http://r.789695.n4.nabble.com/file/n4623493/mydata.txt";)[[1]] # Have to drop visible attribute lmmodel <- lm(

Re: [R] FW: averaging two tables (rows with columns)

2012-05-10 Thread John Kane
Well I'd suggest learning to use the return key. It really helps improve the readability of a posting. Three of the for files came through okay but table3a has a problem. It looks like some kind of extraneous charater(s) got into it but a second or so of editing makes it work so we have all 4

[R] storage of matrices of diff dimension together

2012-05-10 Thread carol white
Hi, It might be a trivial question but how do you store matrices of different dimensions read from a file or in a loop together? The best solution might be a list but I don't store the first matrix  correctly:  m = rbind(c(1,2),c(3,4),c(5,6)) t=rbind(c(1,2),c(5,6))  l = list(m) > l = list(l,t)

Re: [R] storage of matrices of diff dimension together

2012-05-10 Thread Sarah Goslee
Hi Carol, > m1 <- rbind(c(1,2),c(3,4),c(5,6)) > m2 <- rbind(c(1,2),c(5,6)) > mylist <- list(m1) > c(mylist, list(m2)) [[1]] [,1] [,2] [1,]12 [2,]34 [3,]56 [[2]] [,1] [,2] [1,]12 [2,]56 See the examples in ?c for more information. Sarah On Thu,

[R] fda problems - version correct?

2012-05-10 Thread Troels Ring
Dear friends - I am trying to understand fda and working with the 2009 book from Springer. I run the scripts directly from a new installed fda library and include sessionInfo() below. This is from the script fdarm-ch09.R - I seem to have got not fda_2.2.8 but 2.2.7 - is that the problem? Wher

Re: [R] converting raster image

2012-05-10 Thread Michael Sumner
You should provide reproducible code and at the very least declare the packages you are using. I guess this from the package raster? See example in ?raster::interpolate: ## Thin plate spline interpolation with x and y only library(fields) r <- raster(system.file("external/test.grd", pa

[R] Resampling question

2012-05-10 Thread Vikram Chhatre
Hello - I have a population of 100 individuals that I would like to bootstrap 10 times, every time removing 5 *different* individuals. So far, I have done the following: pop <- read.table('mypop.txt', header=FALSE) replicate(10, sample(pop, 95, replace=FALSE)) I have not actually gone through

Re: [R] Barplots inside loop - several data errors, workaround needed

2012-05-10 Thread Lee
Looking at the documentation for try() I am not sure how it would be best applied in this situation. My background is not extensively programming. Would writing a function first be appropriate? Also, I'm not sure just a simple error catch would solve my first problem. I do, in fact, need it to plo

Re: [R] Resampling question

2012-05-10 Thread R. Michael Weylandt
No, it will not, except possibly by chance: if the draws of sample are IID (and they are supposed to be) there's no reason to expect them not to overlap. If you want that -- and I'm not sure it's totally on the level bootstrapping-wise -- you need to decide which ones to remove all in one fell swo

Re: [R] Resampling question

2012-05-10 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Vikram Chhatre > Sent: Thursday, May 10, 2012 4:57 PM > To: r-help@r-project.org > Subject: [R] Resampling question > > Hello - > > I have a population of 100 individuals that I

Re: [R] Barplots inside loop - several data errors, workaround needed

2012-05-10 Thread Steve Lianoglou
Hi, On Thu, May 10, 2012 at 8:35 PM, Lee wrote: > Looking at the documentation for try() I am not sure how it would be best > applied in this situation. My background is not extensively programming. > Would writing a function first be appropriate? > > Also, I'm not sure just a simple error catch

[R] moving data from one frame to another

2012-05-10 Thread Daniel_55
Hello, I am working with two different data frames, and I'd like to move data from one to the other. Here is the first frame: > head(five) Week Game.ID VTm VPts HTm HPts HDifferential VDifferential 11 NFL_20050908_OAK@NE OAK 20 NE 3010 -10 21 NFL

[R] Result of clustering on plot

2012-05-10 Thread greyofthedawn
Hello! I 'm new to R and need your help in one question... I did cluster analysis using kmeans function. I load data from file: This file also contains headers for objects I want to cluster. After making a clustering procedure I display result on plot: And it shows only points (i.e. objects) wit

Re: [R] Can't read xlsx file into R. Seem, Seem to have XLConnect loaded.

2012-05-10 Thread Martin Studer
Hi Mike, as others have already suggested, there might be a problem with quoting. Otherwise, did you already have a look at the package vignette ( http://cran.r-project.org/web/packages/XLConnect/vignettes/XLConnect.pdf http://cran.r-project.org/web/packages/XLConnect/vignettes/XLConnect.pdf ) tha

[R] Error t value matrix

2012-05-10 Thread Trying To learn again
Hi all, I want to make the following: I want to run a linear regression on each column of a matrix "estima" on the correspondent column on the matrix "estima2". You see I want to regress estima[,1] on estima2[,1] this way to all columns At the same time I want to make a regression adding e

Re: [R] moving data from one frame to another

2012-05-10 Thread Daniel_55
When I tried doing that, it only merged the averages from column 1 — ARI — and did not spread the averages for ARI, ATL, BAL. Any ideas on how I could keep it from making all of the HTms ARI and all of the averages 19.4375? -- View this message in context: http://r.789695.n4.nabble.com/moving-da

[R] Coloring subsets of points of a strip chart by quantiles

2012-05-10 Thread Nicholas Edgington
Hello All, I am trying to color five subsets of points in a series of vertical strip charts by quintiles using the quantile function, but I have not been able to do this successfully, nor have I been able to find an example of this online. I would like to have the "E1", "E2", and "E3" columns plo

[R] survival analysis simulation question

2012-05-10 Thread Grace Ma
Hi, I am trying to simulate a regression on survival data under a few conditions: 1. Under different error distributions 2. Have the error term be dependent on the covariates But I'm not sure how to specify either conditions. I am using the Design package to perform the survival analysis using the

[R] how to do averaging of two tables (rows with columns)

2012-05-10 Thread Kristi Glover
Hi R user, I finally able to send you the table in readable format. I have seen that some of you do send tables in email when asking questions, but why i could not send. Any way some of you helped me to send you the example table in a readable format. now, I want to concentrate on my prob

[R] how to combine two tables with different orientation and get mean from the two tables

2012-05-10 Thread Kristi Glover
Hi R user, I finally able to send you the table in readable format. I have seen that some of you do send tables in email when asking questions, but why i could not send. Any way some of you helped me to send you the example table in a readable format. now, I want to concentrate on my probl

Re: [R] Interweaving of two datasets

2012-05-10 Thread lunarossa
I tried to do using merge, I think now it works (anyway it is your worth), I wrote: df1<-read.csv("df1.csv",head=T) attach(df1) df2<-read.csv("df2.csv",head=T) attach(df2) join<-merge(df1,df2,by.x="name",by.y="name") Is it correct? Coz I'm very frightened to lose datas or make mistakes -- View

Re: [R] Matrix heatmap

2012-05-10 Thread fjucks
how do I plot only the data below 10? everything is white for the 0-10 and 10-90 is black .. those functions which do this? was bad for such basic questions, but I started tinkering with R is 6 days -- View this message in context: http://r.789695.n4.nabble.com/Matrix-heatmap-tp4619084p4625021.ht

  1   2   >