Re: [R] Plotting series with no data in xyplot

2011-11-16 Thread Donald Catanzaro, PhD
Good Day All, I am working on some xyplots using the Lattice Library. My X-axis is the date and I am reproducing charts similar to those found in the R Gallery (see here: http://www.sr.bham.ac.uk/~ajrs/R/gallery/plot_midday_weather_profiles.txt) However, the key difference is that some of

Re: [R] package installtion

2011-11-16 Thread Uwe Ligges
On 15.11.2011 21:34, Scott Raynaud wrote: OK, I think I see the problem. Rather than setting method=nAGQ I need nAGQ=1. Doing so throws the following error: Congratulations, now you understood what R meant with its message Argument ‘method’ is deprecated. Warning messages: 1: glm.fit:

Re: [R] Theil decomposition

2011-11-16 Thread Dennis Murphy
Looking at the help pages in the ineq package, the Theil() function simply returns the value of the index. You can look at the source code of the relevant functions to see what they actually compute: library('ineq') ineq # the main function Theil# for the Theil index Neither function is

Re: [R] plotting a double y axis when x and y lengths differ

2011-11-16 Thread Jim Lemon
On 11/16/2011 03:51 PM, Vinny Moriarty wrote: Hello All, Many thanks to the help I have received so far. Here is an example data set I hope to plot Data1 Year Data SE 1 20052 0.01 2 20064 0.01 3 20075 0.01 4 20082 0.01 5 20093 0.01 6 20106 0.01 Data2 Year

[R] geom_bar with missing data in package ggplot

2011-11-16 Thread Aidan Corcoran
Dear all, I was hoping someone could help with a ggplot question. I would like to generate a faceted bar chart, but missing data are causing problems. g-structure(list(Date = structure(c(11322, 11687, 12052, 11322, 11687, 12052, 11322, 11687, 12052, 11322, 11687, 12052), class = Date),

Re: [R] Models with ordered and unordered factors

2011-11-16 Thread Catarina Miranda
Thanks a lot for your answers and reading suggestions, now I know my guess was completely wrong. I guess in my case it will be more informative to keep the unordered factors. That way I can know not only that days differ in general, but also get information on which day is differing from day 1.

Re: [R] Regular expressions in R

2011-11-16 Thread Michael Griffiths
Thanks to everyone who contributed to my questions. As ever, I am extremely grateful to all those on the R-list who make it what it is. Regards Mike Griffiths On Tue, Nov 15, 2011 at 5:47 PM, Joshua Wiley jwiley.ps...@gmail.comwrote: Hi Michael, Your strings were long so I made a bit

Re: [R] geom_bar with missing data in package ggplot

2011-11-16 Thread Dennis Murphy
Hi: Here's one way, but it puts the two countries side by side rather than stacked (I'm not a big fan of stacked bar charts except in certain contexts). The first version uses the original data, but one can see immediately that there is no distinction between NA and 0: ggplot(g, aes(x = Date, y

Re: [R] Conversion of symmetry matrix into a vector ONE MORE QUESTION

2011-11-16 Thread R. Michael Weylandt
Try the as.dist() function -- it won't change any values, only give you something that, upon printing, gets formatted like a dist object. as.matrix() will reverse it. Michael On Wed, Nov 16, 2011 at 5:58 AM, ram basnet basnet...@yahoo.com wrote: Dear Michael, Thank you very much. That what i

[R] create list of names where two df contain == values

2011-11-16 Thread Rob Griffin
Hello again... sorry to be posting yet again, but I hadn't anticipated this problem. I am trying to now put the names found in one column in data frame 1 (lets call it df.1[,1]) in to a list from the rows where the values in df.1[,2] match values in a column of another dataframe (df.2[3]) I

Re: [R] R forum for only Statistics

2011-11-16 Thread R. Michael Weylandt michael.weyla...@gmail.com
Might I suggest you read the upstream postings in this thread you seem to have brought back from beyond the grave and check those resources for methodological questions (particularly CV). Once you decide what you want to do, get in touch with SPSS support and ask them how to do it. When that

[R] hierachical code system

2011-11-16 Thread Albert-Jan Roskam
Hi,   I have a hierachical code system such as the example below (the printed data are easiest to read). I would like to write a function that returns an 'imputed' data frame, ie. where the the parent values are calculated as the sum of the child values. So, for instance, STAT.01.01.06  is the

Re: [R] package installtion

2011-11-16 Thread Scott Raynaud
Well, I could increase the sample size for my second level in hopes that my simulation would run correctly.  However, a better solution would be to assign values of 0 to the fixed effects for this pass through the simulation.  I'm such a novice with R that I don't know if that can be done. 

Re: [R] create list of names where two df contain == values

2011-11-16 Thread R. Michael Weylandt michael.weyla...@gmail.com
I'm not at a computer now, so I can't take a close look at it, but I think the match() function can be helpful here. I'll try to get back to you with a fuller answer later. Michael On Nov 16, 2011, at 8:03 AM, Rob Griffin robgriffin...@hotmail.com wrote: Hello again... sorry to be posting

Re: [R] hierachical code system

2011-11-16 Thread ONKELINX, Thierry
Dear Albert-Jan, The easiest way is to create extra variables with the corresponding aggregation level. substr() en strsplit() can be your friends. Once you have those variables you can use aggregate() or any other aggregating function. You don't need loops. Best regards, Thierry

[R] calculating time interval distributions

2011-11-16 Thread Grant Gillis
Dear List, I have data on a approximately 100 individuals visiting a a central logging station over a 1000 times. I would like to be able to calculate the distribution of inter-visit time intervals for all possible pairs am stuck on how to code for this. Single pairs are not a problem but

Re: [R] create list of names where two df contain == values

2011-11-16 Thread David Winsemius
On Nov 16, 2011, at 8:03 AM, Rob Griffin wrote: Hello again... sorry to be posting yet again, but I hadn't anticipated this problem. I am trying to now put the names found in one column in data frame 1 (lets call it df.1[,1]) in to a list from the rows where the values in df.1[,2] match

Re: [R] geom_bar with missing data in package ggplot

2011-11-16 Thread Aidan Corcoran
Hi Dennis, that does exactly what I needed, and the treatment of missing values is really useful. thanks for your help. Aidan On Wed, Nov 16, 2011 at 12:22 PM, Dennis Murphy djmu...@gmail.com wrote: Hi: Here's one way, but it puts the two countries side by side rather than stacked (I'm not

[R] Replacing values in matrix/dataframe according to changing criteria

2011-11-16 Thread Frederik Lyngsaa Lang
Hi there, I am doing some network analysis working with k-cliques and over time I want to see what nodes are members of what cliques and how big these cliques are. I have managed to produce a matrix which shows which k-cliques each node is part of over the 100 time periods (slow though) but I

[R] Maximum likelihood for censored geometric distribution

2011-11-16 Thread A.D.Higginson
Hi all, I need to check for a difference between treatment groups in the parameter of the geometric distribution, but with a cut-off (i.e. right censored). In my experiment I stimulated animals to see whether I got a response, and stopped stimulating if the animal responded OR if I had

[R] Numerical Format on axis

2011-11-16 Thread Mario Giesel
Hello, list,    I'm new to R and I'm trying to produce a chart with currency values on the y axis. Values should be e.g. 1,00, 1,50, 2,00, etc. In fact they are 1,0, 1,5, 2,0, etc. How do I get R to show two digits after the comma on that axis?   Thanks for any help,  Mario [[alternative

[R] problem to tunning RandomForest, an unexpected result

2011-11-16 Thread gianni lavaredo
Dear Researches, I am using RF (in regression way) for analize several metrics extract from image. I am tuning RF setting a loop using different range of mtry, tree and nodesize using the lower value of MSE-OOB mtry from 1 to 5 nodesize from1 to 10 tree from 1 to 500 using this paper as refery

[R] Sequence Prediction

2011-11-16 Thread Aher
I have a data with the sequence of events with millions records and more than 24 time stamped variables. sample data: 1 2 3 4 5 6 7 8 9 10 A A A C C C B B D D D D D D

[R] Non-finite finite-difference value error in eha's aftreg

2011-11-16 Thread Milan Bouchet-Valat
Hi list! I'm getting an error message when trying to fit an accelerated failure time parametric model using the aftreg() function from package eha: Error in optim(beta, Fmin, method = BFGS, control = list(trace = as.integer(printlevel)), : non-finite finite-difference value [2] This only

[R] detect subset in series

2011-11-16 Thread threshold
Dear R Users, I am curious whether there is any simple solution o my problem. My example 'series': series - c(1,1,1,0,1,0,0,1,1,0,0,0,0,1) My 'subset' of interest: subset - c(0,0,0,0) Is there any function which tells me that the subset exists in my series, and gives me position where in series

Re: [R] fitted.values in lm function

2011-11-16 Thread arunkumar1111
Thanks Josh -- View this message in context: http://r.789695.n4.nabble.com/fitted-values-in-lm-function-tp4075426p4076397.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] Interpolating hourly basis

2011-11-16 Thread abcdef ghijk
I have a huge data set in the form of            V1           V2         V3   V4     V5  V6 1     2010050120100501 1.68291.38 1  0 2     20100501201005010300 0.93335.10 1  0 3     20100501201005010600 2.25 57.38 1  0 4     20100501201005010900 0.43 13.76 1  0 5     

[R] changing date format in a dataframe

2011-11-16 Thread arunkumar1111
Hi I have a data frame and i need to change the date format in it. my dataframe X Date 1 1/1/2009 2 2/1/2009 3 3/1/2009 I need to change it to 2009-01-01 -- View this message in context: http://r.789695.n4.nabble.com/changing-date-format-in-a-dataframe-tp4076411p4076411.html Sent from the R

Re: [R] Upgrade R?

2011-11-16 Thread Cem Girit
Hello John, Thank you. It is useful advice. I found the method which eliminates copying the library after new installation given at by Tal at http://www.r-statistics.com/2010/04/changing-your-r-upgrading-strategy-and-t he-r-code-to-do-it-on-windows/ very effective. But my problem and

Re: [R] Numerical Format on axis

2011-11-16 Thread David Winsemius
On Nov 16, 2011, at 7:41 AM, Mario Giesel wrote: Hello, list, I'm new to R and I'm trying to produce a chart with currency values on the y axis. Values should be e.g. 1,00, 1,50, 2,00, etc. In fact they are 1,0, 1,5, 2,0, etc. How do I get R to show two digits after the comma on that

Re: [R] Sequence Prediction

2011-11-16 Thread Ingmar Visser
Searching: time series forecasting on the R website gives quite a few potentially useful options. hth, Ingmar On Wed, Nov 16, 2011 at 1:55 PM, Aher ajit.a...@cedar-consulting.comwrote: I have a data with the sequence of events with millions records and more than 24 time stamped variables.

Re: [R] R forum for only Statistics

2011-11-16 Thread B77S
In addition to getting help from others, I always find that seeking answers through reading to be helpful. I would suggest a basic stats book and this paper regarding issues indices like species richness: http://www.amazon.com/Primer-Ecological-Statistics-Nicholas-Gotelli/dp/0878932690 Here

Re: [R] Interpolating hourly basis

2011-11-16 Thread David Winsemius
On Nov 16, 2011, at 8:56 AM, abcdef ghijk wrote: I have a huge data set in the form of V1 V2 V3 V4 V5 V6 1 2010050120100501 1.68291.38 1 0 2 20100501201005010300 0.93335.10 1 0 3 20100501201005010600 2.25 57.38 1 0 4

Re: [R] detect subset in series

2011-11-16 Thread David Winsemius
On Nov 16, 2011, at 8:25 AM, threshold wrote: Dear R Users, I am curious whether there is any simple solution o my problem. My example 'series': series - c(1,1,1,0,1,0,0,1,1,0,0,0,0,1) My 'subset' of interest: subset - c(0,0,0,0) Is there any function which tells me that the subset exists

Re: [R] create list of names where two df contain == values

2011-11-16 Thread Dennis Murphy
Hi: I think you're overthinking this problem. As is usually the case in R, a vectorized solution is clearer and provides more easily understood code. It's not obvious to me exactly what you want, so we'll try a couple of variations on the same idea. Equality of floating point numbers is a

Re: [R] detect subset in series

2011-11-16 Thread R. Michael Weylandt
If your data is also binary like that below, it might be useful/easier to use regular expressions tools as well: e.g., series - c(1,1,1,0,1,0,0,1,1,0,0,0,0,1) subset - c(0,0,0,0) print(regexpr(paste(subset, collapse = ),paste(series, collapse = ))) Michael On Wed, Nov 16, 2011 at 9:55 AM,

[R] package installtion

2011-11-16 Thread Scott Raynaud
All right.  I upped my level 2 sample size to 60.  My log displays the following: Simulation for sample sizes of  60  macro and unbalanced micro units  Iteration remain= 990    Iteration remain= 980   There were 27 warnings (use warnings() to see them) Error in

Re: [R] calculating time interval distributions

2011-11-16 Thread Bert Gunter
Your question seems rather poorly specified to me, and you may have to clarify it further, but I'll make a stab at it. IF one can assume that: 1. a must occur before b, b before c etc. AND 2. sec is always increasing THEN z - tapply(sec, ind, FUN = min) gives the first appearance sec value

Re: [R] changing date format in a dataframe

2011-11-16 Thread R. Michael Weylandt
Can you dput() your data frame? There are a different few time objects in R and details might depend which one you have. Though, if it's printing like that, I'd guess it's actually a string that you can convert to a Date using as.Date(, format = XXX) where you can work out the formatting from the

Re: [R] changing date format in a dataframe

2011-11-16 Thread Mohamed Lajnef
Hi, If the dates are the same format and the same length you can try this : dates-c(1/1/2009,2/1/2009,3/1/2009) dates_new-as.Date(paste(substr(dates,1,3),substr(dates,7,8),sep=/),format=%d/%m/%y), you can change the format to %m/%d/%y Regards M Le 16/11/11 15:12, arunkumar a écrit :

Re: [R] create list of names where two df contain == values

2011-11-16 Thread Rob Griffin
Ok, thanks for looking in to this so far, I seem to have confused you all a little though so I think I need to make this a bit clearer: in the real situation: df.1 is 271*13891, and contains (amongst others) columns with Flybase.CG, rMF, and Affyid values. df.2 is 14*12572 and is made from

[R] Error in random walk Metroplis-hasting

2011-11-16 Thread Gyanendra Pokharel
Hi R community, I have some data set and construct the likelihood as follows likelihood - function(alpha,beta){ lh-1 d-0 p-0 k-NULL data-read.table(epidemic.txt,header = TRUE) attach(data, warn.conflicts = F) k -which(inftime==1) d -

Re: [R] package installtion

2011-11-16 Thread Uwe Ligges
On 16.11.2011 16:08, Scott Raynaud wrote: All right. I upped my level 2 sample size to 60. My log displays the following: Simulation for sample sizes of 60 macro and unbalanced micro units Iteration remain= 990 Iteration remain= 980 There were 27 warnings (use

[R] Cubic Gradient Descent Package

2011-11-16 Thread Edward Patzelt
R - Does anyone know of a cubic gradient descent package? I found grad.desc() but that only allows for a 2d function. I have 3 free parameters and thus am looking for a 3d function. Thank you, -- Edward H. Patzelt Research Assistant – TRiCAM Lab University of Minnesota –

[R] access sublists by a variable

2011-11-16 Thread Antje Gruner
Dear list, I'd like to access the elements of a list within another list with the help of a variable. dict - list( 24 = c(1,2,3,6,12,24,48,72,96,120,144,168,720), 168 = c(1,12,24,48,72,96,120,144,168,336,504,672), 8760 = c(1,24,168,730,4380,8760) ) dict$24 works

[R] R not 'seeing' numbers?!

2011-11-16 Thread oscar
Hello. I recently came across the extremely strange problem (see below) of R telling me that elements of a list do not exist... I have tried running this small script on 2 computers (Mac OSX 10.7 Windows 7) running the latest releases or R (2.13.2 on Mac, 2.14.0 on Win). I have tried it both

Re: [R] changing date format in a dataframe

2011-11-16 Thread Milan Bouchet-Valat
Le mercredi 16 novembre 2011 à 06:12 -0800, arunkumar a écrit : Hi I have a data frame and i need to change the date format in it. my dataframe X Date 1 1/1/2009 2 2/1/2009 3 3/1/2009 I need to change it to 2009-01-01 See ?as.Date. In your case, I think you should use df[[2]] -

[R] Checking for monotonic sequence

2011-11-16 Thread Mark Carter
I am scraping data from a web page using XML (excellent package BTW - that's scraping data the easy way!). So far, I've got the code: tables - readHTMLTable(theurl) rhf - tables$tabResHistFull div1 - rhf[which(rhf$V1==Div ps),] div1 which is giving me the result:    V1 V2    V3    V4    V5 

[R] outlier identify in qqplot

2011-11-16 Thread agent dunham
Dear Community, I want to identify outliers in my data. I don't know how to use identify command in the plots obtained. I've gone through help files and use mahalanobis example for my purpose: NormalMultivarianteComparefunc - function(x) { Sx - cov(x) D2 - mahalanobis(x,

[R] simple script help

2011-11-16 Thread Nathalie Conte
HI, I have subsetted a list of exons and put them in a vector exon_list exon_list=levels(test5$V1) I want to loop using that vector to create a big pdf which will contain all my barplots and doing this I got only the last element in my exon_list plotted rather than all of them, I guess

Re: [R] detect subset in series

2011-11-16 Thread threshold
Thanks for the answer. I found that smth like below works subset - c(1,0,0) series - c(1,1,1,0,1,0,0,1,1,0,0,0,0,1) subset1 - paste(subset, collapse='') series1 - paste(series, collapse='') xx - gregexpr(subset1, series1, fixed=TRUE) as.numeric(xx[[1]]) ## yields the first element numbers in

Re: [R] Help with error: no acceptable C compiler found in $PATH

2011-11-16 Thread Hari Easwaran
Hi Michael, Thanks for your response. Using the binary seems to solve partially. I am able to install (I think!) RCurl but not able to load the library. Below is the info you required and the error while loading RCurl. * sessionInfo()* R version 2.13.2 (2011-09-30) Platform:

[R] calculating variograms (gstat) with large data sets

2011-11-16 Thread Thomas Grünewald
Dear all, I am aiming to calculate variograms using variogram() from gstat. The problem is that some of my data-sets are very large ( 40 points). Running the command takes some hours of time and does not give any error-message. Nevertheless the result seem not to be appropriate - the first

Re: [R] Cubic Gradient Descent Package

2011-11-16 Thread Taylor B. Arnold
Are you looking for something like nlm()? It does minimization in any number of dimensions using a Newton-type algorithm; it can be manually given gradients / Hessians, or alternatively you can give it neither and let them approximated empirically. Taylor On Wed, Nov 16, 2011 at 11:00 AM, Edward

Re: [R] Conversion of symmetry matrix into a vector ONE MORE QUESTION

2011-11-16 Thread ram basnet
Dear Michael,   Thank you very much.   Ram     From: R. Michael Weylandt michael.weyla...@gmail.com Sent: Wednesday, November 16, 2011 1:48 PM Subject: Re: [R] Conversion of symmetry matrix into a vector ONE MORE QUESTION Try the as.dist() function -- it won't

[R] package installtion

2011-11-16 Thread Scott Raynaud
That might be an option if it weren't my most important predictor.  I'm thinking my best bet is to use MLWin for the estimation since it will properly set fixed effects  to 0.  All my other sample size simulation programs use SAS PROC IML which I don't have/can't afford.  I like R since it's

Re: [R] R not 'seeing' numbers?!

2011-11-16 Thread R. Michael Weylandt
R FAQ 7.31 strikes again. :-) Michael tmp[3105] == 35.52 [1] FALSE tmp[3105] - 35.52 [1] -7.105427e-15 all.equal(tmp[3105], 35.52) TRUE On Wed, Nov 16, 2011 at 10:42 AM, oscar ob...@cam.ac.uk wrote: Hello. I recently came across the extremely strange problem (see below) of R telling me

Re: [R] access sublists by a variable

2011-11-16 Thread R. Michael Weylandt
dict[[a]] ? `[[` Michael On Wed, Nov 16, 2011 at 10:16 AM, Antje Gruner n...@allesjetzt.net wrote: Dear list, I'd like to access the elements of a list within another list with the help of a variable. dict - list(  24 = c(1,2,3,6,12,24,48,72,96,120,144,168,720),          168 =

Re: [R] access sublists by a variable

2011-11-16 Thread David Winsemius
On Nov 16, 2011, at 10:16 AM, Antje Gruner wrote: Dear list, I'd like to access the elements of a list within another list with the help of a variable. dict - list( 24 = c(1,2,3,6,12,24,48,72,96,120,144,168,720), 168 = c(1,12,24,48,72,96,120,144,168,336,504,672), 8760 =

Re: [R] simple script help

2011-11-16 Thread R. Michael Weylandt
Put pdf() before your loop and dev.off() after -- as it stands now, on each iteration you re-open the pdf and thereby wipe everything that was previously on it. For the axis, look at the axis() command if you want something detailed or the xaxt, xlab arguments to boxplot if its relatively simple.

[R] activate console

2011-11-16 Thread Ben quant
Hello, After I plot something how do I reactivate the console (and not the plot window) so I don't have to click on the console each time to go to the next command? Example that does not work: fun = function(x){ plot(x); dev.set(dev.prev())} fun(1:4) ...and another that does not work: fun =

Re: [R] Interpolating hourly basis

2011-11-16 Thread R. Michael Weylandt
Can you provide a dput() example of your data and put it in a workable form -- I have no idea what that long list of numbers nor the 1 / 0 on the end represent. I think if you do this with a real time series class like xts you can create a new object with the interpolated times; fill in the values

[R] Contour on top of 2d histogram

2011-11-16 Thread Sramkova, Anna (IEE)
Hi all, I would like to plot one data set as a 2d histogram and another one as a contour. I can do it separately with the hist2d and contour functions, but I wonder if there is a way to combine these two plots into a single one (the ranges of the two plots are the same). Any suggestions?

Re: [R] activate console

2011-11-16 Thread Bert Gunter
??focus ## admittedly, not the first keyword that comes to mind ?bringToTop -- Bert On Wed, Nov 16, 2011 at 9:07 AM, Ben quant ccqu...@gmail.com wrote: Hello, After I plot something how do I reactivate the console (and not the plot window) so I don't have to click on the console each time

Re: [R] Replacing values in matrix/dataframe according to changing criteria

2011-11-16 Thread R. Michael Weylandt
This is a little ugly, but I think it should work pretty robustly: T - table(unlist(df[,-1])) # Take a close look at this to see how it works -- it's the key to the whole thing and basically creates something we will roughly use like a hash-table (if that term is familiar to you) (or more

Re: [R] Contour on top of 2d histogram

2011-11-16 Thread R. Michael Weylandt
Try the add = TRUE argument to contour. Michael On Wed, Nov 16, 2011 at 12:35 PM, Sramkova, Anna (IEE) anna.sramk...@iee.unibe.ch wrote: Hi all, I would like to plot one data set as a 2d histogram and another one as a contour. I can do it separately with the hist2d and contour functions,

Re: [R] Checking for monotonic sequence

2011-11-16 Thread R. Michael Weylandt
Happy to help, but could you provide a dput() example of your data div1 -- I'm not sure if your table elements are coded as factors or doubles and that can make quite a difference. Anyways, once you confirm they are doubles, something like this will do it: apply(D, 1, function(x) all(diff(x)0))

Re: [R] create list of names where two df contain == values

2011-11-16 Thread Rob Griffin
As another potential route could I put something in to the original code that makes df.2 (maindata2) which picks one of the AffyIds at random for the duplicated FlybaseCG values (shown below) maindata2-aggregate(maindata[,c(161,172,168,255,254,258,264,265,263,271)], by = maindata[,167, drop =

Re: [R] activate console

2011-11-16 Thread Ben quant
Perfect, thanks! Naturally, now I need to resize the console so it doesn't cover my new plots. I'd like to resize it on the fly (from within the function) then reset the size to its previous size. So, curConsoleDims() and resize.console() are a made up functions, but they demonstrate what I am

Re: [R] Error in random walk Metroplis-hasting

2011-11-16 Thread R. Michael Weylandt
Three things: 1) This isn't reproducible without your data file. Work out a minimal reproducible example -- I bet you'll find your answer along the way -- and supply it. 2) What do the warnings say: they are usually pretty good at directing you to trouble. 3) Don't use attach. Seriously -- just

[R] goodness of fit of a mixed model and function in R

2011-11-16 Thread FMH
Dear All,   Could anybody please advice me the way to check the goodness of fit of the linear mixed-effects model and the suitable function in R to do so, and thank you in advance for your assistance.   Fir [[alternative HTML version deleted]]

Re: [R] access sublists by a variable

2011-11-16 Thread Dennis Murphy
Hi: Try dict[[a]] rather than dict$a, and read the section on lists in the Introduction to R manual to learn how to properly index them. HTH, Dennis On Wed, Nov 16, 2011 at 7:16 AM, Antje Gruner n...@allesjetzt.net wrote: Dear list, I'd like to access the elements of a list within another

Re: [R] equal spacing of the polygons in levelplot key (lattice)

2011-11-16 Thread Andy Bunn
-Original Message- From: Dennis Murphy [mailto:djmu...@gmail.com] Sent: Tuesday, November 15, 2011 8:54 PM To: Andy Bunn Cc: r-help@r-project.org Subject: Re: [R] equal spacing of the polygons in levelplot key (lattice) Hi: Does this work? Thanks Dennis. This almost works.

Re: [R] package installtion

2011-11-16 Thread Uwe Ligges
On 16.11.2011 17:37, Scott Raynaud wrote: That might be an option if it weren't my most important predictor. I'm thinking my best bet is to use MLWin for the estimation since it will properly set fixed effects to 0. All my other sample size simulation programs use SAS PROC IML which I

Re: [R] equal spacing of the polygons in levelplot key (lattice)

2011-11-16 Thread Dennis Murphy
OK, how about this instead? # library('lattice') levs - as.vector(quantile(volcano,c(0,0.1,0.5,0.9,0.99,1))) levq - seq(min(levs), max(levs), length = 6) levelplot(volcano, at = levs, colorkey = list(at = levq, labels = list(at = levq,

[R] Pairwise correlation

2011-11-16 Thread muzz56
Dear All, I am not familiar with R yet I want to use it to perform some task, hence my posting here. I hope someone can help. I have a set of data, genes (rows) and samples (columns). I want to do a Pearson correlation on all the possible pairwise combinations of all the genes (2000). Does anyone

[R] permutation within rows of a matrix

2011-11-16 Thread Juan Antonio Balbuena
Hello This is probably a basic question but I am quite new to R. I need to permute elements within rows of a binary matrix, such as [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,]000010000 0 [2,]001100011

[R] boxplot strange behavior

2011-11-16 Thread Giovanni Azua
Hello, I generate box plots from my data like this: qplot(x=xxx,y=column,data=data,geom=boxplot) + xlab(xxx) + ylab(ylabel) + theme_bw() + scale_y_log10() + geom_jitter(alpha=I(1/10)) The problem is that I see lot of points above the maximum at the same level as some outliers. It looks very

Re: [R] equal spacing of the polygons in levelplot key (lattice)

2011-11-16 Thread Andy Bunn
-Original Message- From: Dennis Murphy [mailto:djmu...@gmail.com] Sent: Wednesday, November 16, 2011 11:22 AM To: Andy Bunn Cc: r-help@r-project.org Subject: Re: [R] equal spacing of the polygons in levelplot key (lattice) OK, how about this instead? # library('lattice') levs

Re: [R] permutation within rows of a matrix

2011-11-16 Thread R. Michael Weylandt
Suppose your matrix is called X. ? sample X[sample(nrow(X)),] Michael On Wed, Nov 16, 2011 at 11:45 AM, Juan Antonio Balbuena balbu...@uv.es wrote: Hello This is probably a basic question but I am quite new to R. I need to permute elements within rows of a binary matrix, such as     [,1]

Re: [R] Pairwise correlation

2011-11-16 Thread Peter Langfelder
On Wed, Nov 16, 2011 at 8:37 AM, muzz56 musah...@gmail.com wrote: Dear All, I am not familiar with R yet I want to use it to perform some task, hence my posting here. I hope someone can help. I have a set of data, genes (rows) and samples (columns). I want to do a Pearson correlation on all

Re: [R] Pairwise correlation

2011-11-16 Thread R. Michael Weylandt
?cor X = matrix(rnorm(400),ncol = 4) cor(X) Michael On Wed, Nov 16, 2011 at 11:37 AM, muzz56 musah...@gmail.com wrote: Dear All, I am not familiar with R yet I want to use it to perform some task, hence my posting here. I hope someone can help. I have a set of data, genes (rows) and samples

[R] package installtion

2011-11-16 Thread Scott Raynaud
OK, I'm using William Browne's MLPowSim to create an R script which will simulate samples for estimation of sample size in mixed models.  I have subjects  nested in hospitals with hospitals treated as random and all of my covariates at level 1.  My outcome is death, so it's binary and I'll have

Re: [R] boxplot strange behavior

2011-11-16 Thread Dennis Murphy
And you got a reply on the ggplot2 list, which is why you're asked not to cross-post. For those who are wondering, geom_boxplot() in the ggplot2 package will by default plot outside points along the same line as the boxplot whiskers at their actual values. The gentleman jittered the original

[R] Splitting row in function of time

2011-11-16 Thread PEL
Hello all, I have a data frame that looks like this: http://r.789695.n4.nabble.com/file/n4077622/Capture.png I would like to know if it's possible to split a single row into two rows when the time frame between beg and end overlaps midnight. I want to compare the frequency of each activity for

Re: [R] HELP DATA CLIPPING AND DATA OVERLAY ON A MAP

2011-11-16 Thread Peter Maclean
I have csv data that extend beyond the area I want for an existing map. I want using the boundaries of the polygon shape file as a cookie cutter so that I can overlay the csv data on map without including anything outside the map boundaries and create a dbf file or shapefile of the clipped data

[R] apply on rows and columns?

2011-11-16 Thread rkevinburton
I have the following scenario: m - matrix(1:4, ncol=2) m [,1] [,2] [1,]13 [2,]24 apply(m, 2, sum) [1] 3 7 apply(m, 1, sum) [1] 4 6 So I can apply to rows *or* columns. According to the documentation (?apply) MARGIN a vector giving the subscripts which the function

Re: [R] permutation within rows of a matrix

2011-11-16 Thread Gavin Simpson
On Wed, 2011-11-16 at 14:29 -0500, R. Michael Weylandt wrote: Suppose your matrix is called X. ? sample X[sample(nrow(X)),] That will shuffle the rows at random, not permute within the rows. Here is an alternative, first using one of my packages (permute - shameful promotion ;-) !: mat -

Re: [R] apply on rows and columns?

2011-11-16 Thread R. Michael Weylandt
It's the same as what you began with -- and that's because you broke it down by columns and rows and took the sum of everything that resulted. I.e., sum(m[1,1]) sum(m[2,1]) sum(m[1,2]) sum(m[2,2]) and put them back together. Michael On Wed, Nov 16, 2011 at 3:13 PM, rkevinbur...@charter.net

Re: [R] apply on rows and columns?

2011-11-16 Thread Sarah Goslee
Hi, On Wed, Nov 16, 2011 at 3:13 PM, rkevinbur...@charter.net wrote: I have the following scenario: m - matrix(1:4, ncol=2) m      [,1] [,2] [1,]    1    3 [2,]    2    4 apply(m, 2, sum) [1] 3 7 apply(m, 1, sum) [1] 4 6 So I can apply to rows *or* columns. According to the

Re: [R] apply on rows and columns?

2011-11-16 Thread Justin Haynes
To expand on what Sarah and Michael said: if you have a 3d array: x-array(1:4,c(2,2,4)) x , , 1 [,1] [,2] [1,]13 [2,]24 , , 2 [,1] [,2] [1,]13 [2,]24 , , 3 [,1] [,2] [1,]13 [2,]24 , , 4 [,1] [,2] [1,]13 [2,]

Re: [R] Splitting row in function of time

2011-11-16 Thread jim holtman
Try this: (it would have been easier if you had used 'dput' on your data) x - read.table('/temp/example.txt', skip = 1, as.is = TRUE) # convert to POSIXct x$beg - as.POSIXct(paste(x$V4, x$V5)) x$end - as.POSIXct(paste(x$V6, x$V7)) # determine breaks over midnight x$over - format(x$beg, %d) !=

[R] read.table : fill missing entry with unAvailable

2011-11-16 Thread Mary Kindall
Hi R users, I try to read a data file (tab delimited format) in which some of the entries in a particular field are missing. Is it possible to fill the unavailable data with 'UnAvailable' string while performing read.table() Something like df = read.table(DataFile, header=FALSE,

[R] ANOVA on residuals to check for equality of variances

2011-11-16 Thread Schreiber, Stefan
Hi all, I know that I can run an one way ANOVA on the absolute residual values to check the assumption of equal variances: model- lm(y~x) summary(lm(abs(model$resid~x))) What if I have two factors? As far as I know I have to check this assumption on very factor/level combination. So if I have 3

[R] read.table : fill missing entry with unAvailable [edit]

2011-11-16 Thread Mary Kindall
Hi R users, I try to read a data file (tab delimited format) in which some of the entries in a particular field are missing. Is it possible to fill the unavailable data with 'UnAvailable' string while performing read.table() Something like df = read.table(DataFile, header=FALSE,

[R] read.table : fill missing entry with unAvailable [edit]

2011-11-16 Thread Mary Kindall
I am very sorry for multiple mails. Hi R users, I try to read a data file (tab delimited format) in which some of the entries in a particular field are missing. Is it possible to fill the unavailable data with 'UnAvailable' string while performing read.table() Something like df =

Re: [R] Pairwise correlation

2011-11-16 Thread muzz56
Thanks Peter. I tried this after reading in the csv (read.csv) and converted the data to matrix (as.matrix). But when I tried the correlation, I keeping getting the error (x must be numeric) yet when I view the data, its numeric. On 16 November 2011 14:32, plangfelder [via R]

Re: [R] linear against nonlinear alternatives - quantile regression

2011-11-16 Thread Xu Wang
I'm just curious if Professor Koenker responded to this (e.g. in an individual email or otherwise), as I would be interested in the answer. -- View this message in context: http://r.789695.n4.nabble.com/linear-against-nonlinear-alternatives-quantile-regression-tp3993327p4077713.html Sent from

[R] multiplying columns in matrix

2011-11-16 Thread Eli Cohen
Say I have two matrixes: one is 8x28 and other 8x8 I'd like to multiply, for example, first and second column from the 8x8 and plant them in first column of 8x28. Then take first and third of 8x8 and plant into second column of 8x28.etc. Any ideas? Thanks! [[alternative HTML

Re: [R] Pairwise correlation

2011-11-16 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of muzz56 Sent: Wednesday, November 16, 2011 12:28 PM To: r-help@r-project.org Subject: Re: [R] Pairwise correlation Thanks Peter. I tried this after reading in the csv

  1   2   >