Re: [R] Lattice Histogram with Normal Curve - Y axis as percentages

2014-05-05 Thread Duncan Mackay
Hi Jim Without going to the histogram function to study it in detail it appears when there is density used in the histogram function the data has to be in the original scale to to send to the panel function. As you example is not reproducible use the singer data to get the ylimits for the hist

[R] Making a package works on any R version

2014-05-05 Thread Ashis Deb
Hi all I had made a package in R-3.0.3 , and its running well , my issue is it is not running in other versions or R like R-3.0.2/3.0.1 it is showing error like --- Error: This is R 3.0.2, package ‘xxx’ needs >= 3.0.3 Does anybody have the solution on how to ma

Re: [R] list.files accessing subdirectory as relative path?

2014-05-05 Thread Frede Aakmann Tøgersen
Hi ".." is the parent directory whereas "." is the current directory, so you probably want list.files(path = "./Least Developed Countries") instead of list.files(path = "../Least Developed Countries") Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant

Re: [R] Problem with products in R ?

2014-05-05 Thread Gabor Grothendieck
1. Firstly your library should be in user space. Don't use the one in C:\Program Files\... . That is the case not only for bc but for other packages too. Reinstall R and the first time you install a package it should ask you to allow it to create a user library. Be sure you allow that. 2. As i

Re: [R] Problem with products in R ?

2014-05-05 Thread Richard M. Heiberger
Gabor, Can you confirm that the bc function is supposed to be current. The bc package works with my Mac, but not with Windows. I keep getting the message Error in system(cmd, input = input, intern = TRUE) : -l The FAQ on your https://code.google.com/p/r-bc/ page didn't get me past that problem.

Re: [R] multiply of two expressions

2014-05-05 Thread Gabor Grothendieck
On Mon, May 5, 2014 at 10:16 PM, David Winsemius wrote: > > On May 5, 2014, at 6:05 PM, Gabor Grothendieck wrote: > >> On Mon, May 5, 2014 at 9:43 AM, Niloofar.Javanrouh >> wrote: >>> >>> >>> hello, >>> i want to differentiate of L with respect to b >>> when: >>> >>> L= k*ln (k/(k+mu)) + sum(y) *

Re: [R] multiply of two expressions

2014-05-05 Thread David Winsemius
On May 5, 2014, at 6:05 PM, Gabor Grothendieck wrote: > On Mon, May 5, 2014 at 9:43 AM, Niloofar.Javanrouh > wrote: >> >> >> hello, >> i want to differentiate of L with respect to b >> when: >> >> L= k*ln (k/(k+mu)) + sum(y) * ln (1-(k/mu+k)) #(negative binomial ln >> likelihood) >> and >>

Re: [R] multiply of two expressions

2014-05-05 Thread Gabor Grothendieck
On Mon, May 5, 2014 at 9:43 AM, Niloofar.Javanrouh wrote: > > > hello, > i want to differentiate of L with respect to b > when: > > L= k*ln (k/(k+mu)) + sum(y) * ln (1-(k/mu+k)) #(negative binomial ln > likelihood) > and > ln(mu/(mu+k)) = a+bx #link function > > how can i do it in R? Try th

Re: [R] Max characters from deparse(substitute(.))?

2014-05-05 Thread Spencer Graves
On 5/5/2014 3:42 PM, William Dunlap wrote: Have you looked at the width.cutoff and nlines arguments to deparse? width.cutoff controls how long a line can be and it quits producing output (saving time and space) after nlines of output are produced. You want essentially the following f0 <- func

Re: [R] SQL vs R

2014-05-05 Thread Gabor Grothendieck
On Fri, May 2, 2014 at 5:23 PM, Dr Eberhard Lisse wrote: > Hi, > > How do I do something like this without using sqldf? > > a <- sqldf("SELECT COUNT(*) FROM b WHERE c = 'd'") > > or > > e <- sqldf("SELECT f, COUNT(*) FROM b GROUP BY f ORDER BY f") > In the examples section at the bottom of ?sqldf

Re: [R] Max characters from deparse(substitute(.))?

2014-05-05 Thread William Dunlap
Have you looked at the width.cutoff and nlines arguments to deparse? width.cutoff controls how long a line can be and it quits producing output (saving time and space) after nlines of output are produced. You want essentially the following f0 <- function(x, maxChar=20) deparse(x, width.cutoff=ma

Re: [R] Sciplot: Increasing the width of bargraph and decreasing the sapce b/n groups

2014-05-05 Thread Jim Lemon
On 05/06/2014 05:02 AM, Roopa Subbaiaih wrote: Hello, I am trying to plot bargraphs susing Sciplot. Is there a way to increase the width of the bar graphs and decrease the space b/n the groups? I am pasting the script as well as attaching the graph. Bio6<- read.csv("Data/Plin1.csv",na.strings="

[R] Max characters from deparse(substitute(.))?

2014-05-05 Thread Spencer Graves
Is there a standard or or a standard utility to limit the size of deparse(substitute(.))? Below please find an example of the problem plus one solution. If another solution already exists, I might prefer to use it. Thanks, Spencer ## ## Problem ## deparse.x0 <-

Re: [R] SQL vs R

2014-05-05 Thread David Winsemius
On May 5, 2014, at 11:44 AM, Dr Eberhard Lisse wrote: > I do not wish to prolong this metadiscussion but I remain confused > by your advice: > > 1) You don't understand what I asked (ie would have to parse two > simple SQL statements) Correct ... at least for me. I could have guessed at what th

Re: [R] Tick marks at the 0:0 point in a plot ()

2014-05-05 Thread Ahmed Attia
Dear William, Worded beautifully. Yes, I wanted to get the tick marks at the left corner. I had to just add xaxs="i" and yaxs="i" Thanks Ahmed Ahmed M. Attia Research Assistant Dept. of Soil&Crop Sciences Texas A&M University ahmed.at...@ag.tamu.edu Cell phone: 001-979-248-5215 FAX: 001-308

Re: [R] list.files accessing subdirectory as relative path?

2014-05-05 Thread MacQueen, Don
If 'foo' is a subdirectory of the current working directory, then list.files('foo') lists the files in foo. ".." goes up one level But you did not want to go up one level. You wanted to stay at the same level. (also, '...' has no meaning in pathnames) Try either of list.files(path = "./Least

Re: [R] function to compare lengths?

2014-05-05 Thread Spencer Graves
On 5/5/2014 1:19 PM, Duncan Murdoch wrote: On 05/05/2014, 3:39 PM, Spencer Graves wrote: Is there a function someplace to compare lengths? For example, if "longer object length is not a multiple of shorter object length", "a/b" issues a warning. I'd like something with more fl

[R] list.files accessing subdirectory as relative path?

2014-05-05 Thread Adel
Dear list members, I would like to access a subdirectory given where the work directory has been set. So I have: > getwd() [1] "C:/Users/Lord Adellus/Dropbox/I8child1/Data" > list.files() # give three folders [1] "Least Developed Countries" [4] "Low middle income group

[R] Degrees of Freedom GAM/GAMM

2014-05-05 Thread Worthington, Thomas A
Dear All I've fitted a GAMM to relate water temperature to the day of the year (DOY) at three different sites. I used summary(MFinal$gam) and anova(MFinal$gam) to produce the output of my model. I'm confused on how to report the degrees of freedom for the smother and the factor. I currently ha

[R] Sciplot: Increasing the width of bargraph and decreasing the sapce b/n groups

2014-05-05 Thread Roopa Subbaiaih
Hello, I am trying to plot bargraphs susing Sciplot. Is there a way to increase the width of the bar graphs and decrease the space b/n the groups? I am pasting the script as well as attaching the graph. Bio6 <- read.csv("Data/Plin1.csv",na.strings="",header=T) attach(Bio6) head(Bio6) par(family="

[R] Lattice Histogram with Normal Curve - Y axis as percentages

2014-05-05 Thread jimdare
Hello, This may seem like a simple problem, but it's frustrating me immensely. I'm trying to overlay a normal curve (dnorm) on top of a histogram using the code below. This works find when the type = "density", but the person for whom I'm making the plot wants the y axis in percent of total rath

[R] multiply of two expressions

2014-05-05 Thread Niloofar.Javanrouh
 hello, i want to differentiate of L with respect to b when: L= k*ln (k/(k+mu)) + sum(y) * ln (1-(k/mu+k))   #(negative binomial ln likelihood) and ln(mu/(mu+k)) = a+bx   #link function how can i do it in R? thank you. _ Best Regards Niloofar.Javanrouh Ph.D Student of Bi

Re: [R] function to compare lengths?

2014-05-05 Thread Duncan Murdoch
On 05/05/2014, 3:39 PM, Spencer Graves wrote: Is there a function someplace to compare lengths? For example, if "longer object length is not a multiple of shorter object length", "a/b" issues a warning. I'd like something with more flexibility in what is reported. Had

[R] function to compare lengths?

2014-05-05 Thread Spencer Graves
Is there a function someplace to compare lengths? For example, if "longer object length is not a multiple of shorter object length", "a/b" issues a warning. I'd like something with more flexibility in what is reported. Hadley Wickham's "testthat" and "assertthat" packages

Re: [R] Tick marks at the 0:0 point in a plot ()

2014-05-05 Thread William Dunlap
I don't understand your question - you want a tick mark at 0,0 but you explicitly ask for the y axis to start at 100 (and to go upwards from there). Do you mean you want the initial tick mark on an axis to be at the lower left corner of the plot? If so, see if adding xaxs="i", yaxs="i" to your p

Re: [R] Parsing XML file to data frame

2014-05-05 Thread Timothy W. Cook
I didn't find an attached XML file. Maybe the list removes attachments? You might try posting to StackOverflow.com if this is the case. On Fri, May 2, 2014 at 2:17 PM, starcraz wrote: > Hi all - I am trying to parse out the attached XML file into a data frame. > The file is extracted from Had

[R] Tick marks at the 0:0 point in a plot ()

2014-05-05 Thread Ahmed Attia
Dear R usres, Sorry to bother you with my basic question. I have a quick question about tick mark in R. A reviewer wants the tick marks of the graph to start at 0:0 point. My current code below produces the tick mark a little far from the corner; plot(Simu2~Irrig, data=Ahmed,pch=17, col=1,subset=

Re: [R] auglag store parameters

2014-05-05 Thread MacQueen, Don
Just guessing, but something like pars <- numeric(nloops) for (i in 1:nloops) { ## use auglag pars[i] <- {the $par part of the answer} } might be what you're looking for. All of which has nothing to do with auglag in particular, just simple R programming. -Don -- Don MacQueen Lawren

Re: [R] R Package making error

2014-05-05 Thread Sarah Goslee
While I don't particularly like the idea of a package automatically making changes to the system, you can use installed.packages() to see which of your needed packages are already available, and only install the ones that are missing. Better would be to put the whole list in Depends, and let R m

[R] R Package making error

2014-05-05 Thread Ashis Deb
Hi all , I have a GUI package function like below , trader<-function() { install.packages("Rgtk2") install.packages("cluster") install.packages("gWidgets") install.packages("gWidgetsRGtk2") install.packages("scales") install.packages("RGtk2Extras") install.packages("Fuzz

[R] Plotting a Regression holding some exogeneous constant.

2014-05-05 Thread Katharina Mersmann
Dear R-community, I am totally lost and need help. For a Visualization I need to plot two regressions in the same plot. The intention is to provide a visual basis for a synthesized theoretical discussion. 1.)fixed.1<-plm(CSmean~ FCRlong, data = data.plm, index = c("countrynr","quartal")

Re: [R] uniform number

2014-05-05 Thread Boris Steipe
... or this could mean to accept or reject an edge with p = 0.01 or 0.1 in which case you *might* use rbinom() as in n <- 100 # number of edges p <- 0.27 # desired probability rbinom(n,1,p) [1] 0 1 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 1 ... etc. B. On 2014-05-05, at 5:19 AM, Rolf Turner wrote:

[R] metaMDS in vegan: zero stress

2014-05-05 Thread Mia Bengtsson
Dear R and vegan package users, I have been experiencing problems with the metaMDS function when working on a dataset (euk) consisting of 9 "sites" (RNA extracts of 9 biofilms samples) and 340 "species" (microbial taxa based on rRNA sequences). The problem is that I get nMDS ordinations with ov

Re: [R] uniform number

2014-05-05 Thread Rolf Turner
Please keep responses on-list unless there are compelling reasons not to. It is still not clear what you want to do. You *might* want to assign probabilities to the edges of a graph where these probabilities are uniformly (and independently) distributed on the interval [0.01, 0.10]. This co

Re: [R] uniform number

2014-05-05 Thread Suzen, Mehmet
That paper you cite is about Social networks. You may want to use igraph or sna packages On 5 May 2014 10:54, Ragia Ibrahim wrote: > thanks for replying > > in the following paper > http://www.cs.cornell.edu/home/kleinber/kdd03-inf.pdf > page 6 third paragraph > > > the author writes: > "assi

Re: [R] function to compare lengths of objects?

2014-05-05 Thread Duncan Murdoch
On 05/05/2014, 1:02 AM, Spencer Graves wrote: Is there a standard function to generate messages like "longer object length is not a multiple of shorter object length" but providing more information like the names of the objects? No, not really. At the C level objects don't really have

Re: [R] uniform number

2014-05-05 Thread Suzen, Mehmet
WTF? Is that a R package from you? On 5 May 2014 09:27, Rolf Turner wrote: > On 05/05/14 17:05, Ragia Ibrahim wrote: >> >> >> Dear group, >> How to generate uniform probability choosing p to be 2% and 5%, in >> separate trials for 100 times. > > > No idea WTF you are talking about. Can you f

[R] DESeq vs DESeq2 different DEGs results

2014-05-05 Thread Catalina Aguilar Hurtado
Hi, I want to compare DESeq vs DESeq2 and I am getting different number of DEGs which I will expect to be normal. However, when I compare the 149 genes ID that I get with DESeq with the 869 from DESeq2 there are only ~10 genes that are in common which I don’t understand (using FDR <0.05 for bot

Re: [R] uniform number

2014-05-05 Thread Kehl Dániel
Maybe you thought the binomial distribution? see ?rbinom best, kd Feladó: r-help-boun...@r-project.org [r-help-boun...@r-project.org] ; meghatalmazó: Rolf Turner [r.tur...@auckland.ac.nz] Küldve: 2014. május 5. 9:27 To: Ragia Ibrahim Cc: r-help@r-project.

Re: [R] uniform number

2014-05-05 Thread Rolf Turner
On 05/05/14 17:05, Ragia Ibrahim wrote: Dear group, How to generate uniform probability choosing p to be 2% and 5%, in separate trials for 100 times. No idea WTF you are talking about. Can you formulate a question that is comprehensible to the human mind? cheers, Rolf Turner __