[R] Constrainted Nonlinear Optimization - lack of convergence

2011-05-18 Thread mcgrete
Hello, I am attempting to utilize the 'alabama' package to solve a constrained nonlinear optimization problem. The problem has both equality and inequality constraints (heq and hin functions are used). All constraints are smooth, i.e. I can differentiate easily to produce heq.jac and hin.jac

[R] PAM Clustering Ignores Cluster Number Parameter

2011-05-18 Thread Dario Strbenac
I am using PAM with k = 10 clusters, but I only get one cluster ID for all my observations. I couldn't find any discussion about this in the help file, or mailing lists. Is there a reasonable explanation for this result ? cIDs - pam(all, 10, cluster.only = TRUE, do.swap = FALSE) table(cIDs)

[R] scatter plot: multiple Y variables and error bars

2011-05-18 Thread B77S
#Hi all, #Using the example data that follows, can someone please show me how to get a scatterplot of points with #error bars in the Y direction. something like this works for one Y: xYplot(Cbind(y1, l1, u1) ~x1, data=y) #but this: xYplot(Cbind(y1, l1, u1) + Cbind(y2, l2, u2)~x1, data=y) #

[R] How to make array of regression objects

2011-05-18 Thread Dmitrij Kudriavcev
Dear all, I have made couple logistic regressions, what making a distribution of some event. Currently, i store it like this: o1 - lrm(...) o2 - lrm(...) o3 - lrm(...) ... Then, i have made a function to peak required regression object from this variables by it number: get_object -

[R] text mining analysis and word visualization of pdfs

2011-05-18 Thread Ajay Ohri
Dear Lists, What is the appropriate software package for dumping say 20 PDFS in a folder, then creating data visualization with frequency counts of certain words as well as measure correlation within each file for certain key relationships or key words. I am doing text analysis of biases in

[R] Date_Time detected as Duplicated (but they are not!)

2011-05-18 Thread Agustin Lobo
I have a problem with duplicated date_time stamps that I do not see as duplicated. I read a file with observations taken every 30 minutes: aur2009=read.csv(paste(datadir,AUR_ECPP_2009.csv,sep=/),sep=;,stringsAsFactors=F) aur2009[1:3,1:5] Date.Time E_filled E_filled_flag LE_filled

Re: [R] Date_Time detected as Duplicated (but they are not!)

2011-05-18 Thread Michael Sumner
See under Note in ?strptime: Remember that in most timezones some times do not occur and some occur twice because of transitions to/from summer time. ‘strptime’ does not validate such times (it does not assume a specific timezone), but conversion by ‘as.POSIXct’) will do

Re: [R] Help with PLSR with jack knife

2011-05-18 Thread Bjørn-Helge Mevik
Amit Patel amitrh...@yahoo.co.uk writes: BHPLS1 - plsr(GroupingList ~ PCIList, ncomp = 10, data = PLSdata, validation = LOO) and BHPLS1 - plsr(GroupingList ~ PCIList, ncomp = 10, data = PLSdata, validation = CV) [...] Now I am unsure of how to utilise these to identify the

Re: [R] help with PLSR Loadings

2011-05-18 Thread Bjørn-Helge Mevik
Amit Patel amitrh...@yahoo.co.uk writes: x - loadings(BHPLS1) my loadings contain variable names rather than numbers. No, they don't. str(x) loadings [1:94727, 1:10] -0.00113 -0.03001 -0.00059 -0.00734 -0.02969 ... - attr(*, dimnames)=List of 2 ..$ : chr [1:94727] PCIList1 PCIList2

Re: [R] text mining analysis and word visualization of pdfs

2011-05-18 Thread Karl Ove Hufthammer
Ajay Ohri wrote: What is the appropriate software package for dumping say 20 PDFS in a folder, then creating data visualization with frequency counts of certain words as well as measure correlation within each file for certain key relationships or key words. pdftotext + Unix™ for Poets + R

[R] XLSM Question

2011-05-18 Thread Gabrielsen, Alexandros
Hi, I would like to ask you how to read an arrary from an *.xlsm file? I have tried different packages such as xlsReadWrite and RODBC. Everything is performed on the final versions of addons and R. Additionally, when I tried the RODBC received the following error: library(RODBC) con =

Re: [R] Date_Time detected as Duplicated (but they are not!)

2011-05-18 Thread Agustin Lobo
and is it not possible to ignore savings time? My data are in UTC, with no savings time changes delme = strptime(aur2009[,1], %m/%d/%Y %H:%M,tz=UTC) any(duplicated(delme)) [1] TRUE delme = as.POSIXct(aur2009[,1], %m/%d/%Y %H:%M,tz=UTC) any(duplicated(delme)) [1] TRUE Agus On Wed, May 18,

Re: [R] Date_Time detected as Duplicated (but they are not!)

2011-05-18 Thread Timothy Bates
Dear Augustin: What are the duplicated times? Looks they really do occur twice or more in your original data: perhaps two stamps less time apart than the resolution of your clock? delme[duplicated(delme)] aur2009[[duplicated(delme),1] On 18 May 2011, at 8:49 AM, Agustin Lobo wrote: and is it

[R] Integral Symbol

2011-05-18 Thread Javi Hidalgo
Dear All, I am documenting a R package. That means writing the *.Rd files inside the \man folder of the package structure I was wondering how to write the symbol for an integral function in a formula. Similar to this one in LaTeX: \int_{0}^{10} \Omega(t)dt I already tried \deqn{\int_{0}^{10}

[R] DCC-GARCH model

2011-05-18 Thread Marcin P?�ciennik
Hello, I have a few questions concerning the DCC-GARCH model and its programming in R. So here is what I want to do: I take quotes of two indices - SP500 and DJ. And the aim is to estimate coefficients of the DCC-GARCH model for them. This is how I do it: library(tseries) p1 =

[R] Need expert help with model.matrix

2011-05-18 Thread Axel Urbiz
Dear experts: Is it possible to create a new function based on stats:::model.matrix.default so that an alternative factor coding is used when the function is called instead of the default factor coding? Basically, I'd like to reproduce the results in 'mat' below, without having to explicitly

Re: [R] Integral Symbol

2011-05-18 Thread Uwe Ligges
See the section on writing Mathematics in Rd file in the manual Writing R Extensions. This will show how to produce high quality formulas in LaTeX generated output and ASCII versions otherwise. If you want to provide an excellent HTML version as well, the section on Conditional text is also

Re: [R] How to make array of regression objects

2011-05-18 Thread Ista Zahn
Hi Dmitrij, I think the usual way is to store the results in a list: o - list() o[[1]] - lrm(...) o[[2]] - lrm(...) o[[...]] -lrm(...) then you can access the results like 0[[1]], 0[[2]] ... Best, Ista On Tue, May 17, 2011 at 11:53 PM, Dmitrij Kudriavcev dimitrij.kudriav...@ntsg.lt wrote:

[R] Multidimensional List access

2011-05-18 Thread Ingo Reinhold
Dear all, I have data organized in a way like this Data[[CharacteristicsList1]][[CharacteristicsList2]][[CharacteristicsList3]][[CharacteristicsList4]] where CharacteristicsList4 there is a DF stored with various columns of name V1,V2, ... , Vn Is there an easy way to get a vector of all the

[R] R-code in R-file documentation

2011-05-18 Thread Brian Oney
Hello List, I would like to insert code from .r files into a LaTeX appendix (possibly using Sweave). I was considering: results=tex,eval=true,echo=true= source(file.r) @ but I would just like to echo the code and not evaluate the code within the file. maybe: results=tex,eval=true,echo=false=

[R] [R-pkgs] new package SamplingStrata

2011-05-18 Thread Giulio Barcaroli
Dear R users, I would like to announce that on the CRAN is now available a new package (SamplingStrata version 0.9) for the optimal stratification of sampling frames. This package offers an approach for the determination of the best stratification of a sampling frame, the one that ensures the

[R] Query Gene ontology

2011-05-18 Thread LEMAITRE Hervé Université Paris Sud
Dear R-users, I'm looking for a way to query the gene ontology in R like in the GO browser (AmiGO). I tried different packages (NCBI2R, GOsim ...) but I did not find the way to extract genes names associated to a GO term. Could you tell me if there is a way to do that? Thanks, Hervé

Re: [R] text mining analysis and word visualization of pdfs

2011-05-18 Thread Ashim Kapoor
On Wed, May 18, 2011 at 1:44 PM, Karl Ove Hufthammer k...@huftis.orgwrote: Ajay Ohri wrote: What is the appropriate software package for dumping say 20 PDFS in a folder, then creating data visualization with frequency counts of certain words as well as measure correlation within each file

Re: [R] Query Gene ontology

2011-05-18 Thread David Winsemius
You will find a wider and more experienced audience for this question on the Bioconductor mailing list. -- David On May 18, 2011, at 5:14 AM, LEMAITRE Hervé Université Paris Sud wrote: Dear R-users, I'm looking for a way to query the gene ontology in R like in the GO browser (AmiGO). I

Re: [R] Query Gene ontology

2011-05-18 Thread Ben Bolker
LEMAITRE Hervé Université Paris Sud herve.lemaitre at cea.fr writes: I'm looking for a way to query the gene ontology in R like in the GO browser (AmiGO). I tried different packages (NCBI2R, GOsim ...) but I did not find the way to extract genes names associated to a GO term. Could you

Re: [R] R-code in R-file documentation

2011-05-18 Thread Ben Bolker
Brian Oney zenlines at gmail.com writes: Hello List, I would like to insert code from .r files into a LaTeX appendix (possibly using Sweave). I was considering: [snip] Wouldn't it be easier to use the LaTeX listings package?

Re: [R] Need expert help with model.matrix

2011-05-18 Thread Gabor Grothendieck
On Wed, May 18, 2011 at 7:15 AM, Axel Urbiz axel.ur...@gmail.com wrote: Dear experts: Is it possible to create a new function based on stats:::model.matrix.default so that an alternative factor coding is used when the function is called instead of the default factor coding? Basically, I'd

Re: [R] Question on approximations of full logistic regression model

2011-05-18 Thread khosoda
Thank you for your advice, Tim. I am reading your paper and other materials in your website. I could not find R package of your bootknife method. Is there any R package for this procedure? (11/05/17 14:13), Tim Hesterberg wrote: My usual rule is that whatever gives the widest confidence

Re: [R] Smooth contour of a map

2011-05-18 Thread Pierre Bruyer
I've pratically resolved my problem (the code is under that), but a last thing is not perfect: when I use the function plot to call after the function polygon, there is a marge between my raster and the window. I think it's the axis of the function plot(), but I have not found how delete it.

Re: [R] Integral Symbol

2011-05-18 Thread Javi Hidalgo
Thanks. I was exactly reading the manual Writing R Extensions, on section Mathematics. Where, it informs about basic LaTeX style support. However, It seems like it does not support the LaTeX integral symbol \int, but it does support i.e.: the summation symbol \sum. Has anyone had this

Re: [R] How to make array of regression objects

2011-05-18 Thread Dmitrij Kudriavcev
Thank you, Ista, that exactly, what i was looking for :) Regards, Dmitrij Kudriavcev 2011/5/18 Ista Zahn iz...@psych.rochester.edu Hi Dmitrij, I think the usual way is to store the results in a list: o - list() o[[1]] - lrm(...) o[[2]] - lrm(...) o[[...]] -lrm(...) then you can access

Re: [R] subsetting a list of dataframes

2011-05-18 Thread David Winsemius
On May 17, 2011, at 7:13 PM, Lara Poplarski wrote: Thank you all, this is exactly what I had in mind, except that I still have to get my head around apply et al. Back to the books for me then! Read the lapply( ...) call as: For every element in the object named `data`, send that element

Re: [R] Smooth contour of a map

2011-05-18 Thread David Winsemius
You may be looking for the par settings of xaxs=i, yaxs=i, which if you add them to the plot call will prevent the regular behavior of adding 4% padding to the axis widths. ?par -- David. On May 18, 2011, at 8:27 AM, Pierre Bruyer wrote: I've pratically resolved my problem (the code is

[R] matrix help (first occurrence of variable in column)

2011-05-18 Thread Michael Denslow
Dear R help, Apologies for the less than informative subject line. I will do my best to describe my problem. Consider the following matrix: mdat - matrix(c(1,0,1,1,1,0), nrow = 2, ncol=3, byrow=TRUE, dimnames = list(c(T1, T2), c(sp.1, sp.2, sp.3)))

[R] Change pattern in histograms in ggplot2

2011-05-18 Thread Christopher Desjardins
Hi, I am wondering if there is a way to change the pattern of the fill in histogram in ggplot2? By default the fill is solid and I'd like to add some sort of pattern to make it more visible that these are different levels of a factor. Thanks! Chris [[alternative HTML version deleted]]

Re: [R] Integral Symbol

2011-05-18 Thread Duncan Murdoch
On 18/05/2011 9:09 AM, Javi Hidalgo wrote: Thanks. I was exactly reading the manual Writing R Extensions, on section Mathematics. Where, it informs about basic LaTeX style support. However, It seems like it does not support the LaTeX integral symbol \int, but it does support i.e.: the

[R] R Style Guide -- Was Post-hoc tests in MASS using glm.nb

2011-05-18 Thread Bert Gunter
Thanks Bill. Do you and others think that a link to this guide (or another)should be included in the Posting Guide and/or R FAQ? -- Bert On Tue, May 17, 2011 at 4:07 PM, bill.venab...@csiro.au wrote: Amen to all of that, Bert.  Nicely put.  The google style guide (not perfect, but a

Re: [R] R Style Guide -- Was Post-hoc tests in MASS using glm.nb

2011-05-18 Thread Steve_Friedman
This is the first time I've seen an R Style Guide. I will admit that I haven't looked for one previously, but nevertheless I still haven't seen one. My code style simply evolved (perhaps, chugged along) by reading posts from other users who post to the r-help community. I regularly program with

[R] Changing order of facet grid in ggplot2

2011-05-18 Thread Christopher Desjardins
Hi I am running the following code: sym - c(sym1,sym2,sym4) lifedxm - c(O-BD,O-WELL,O-UNI) life - c(lifedxm,lifedxm,lifedxm) tp - c(TP-ANY,TP-ANY, TP-ANY, TP-SUB, TP-SUB, TP-SUB, TP-CLIN , TP-CLIN, TP-CLIN) data - data.frame(sym,life,tp)

Re: [R] subsetting a list of dataframes

2011-05-18 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Lara Poplarski Sent: Tuesday, May 17, 2011 4:14 PM To: r-help@r-project.org Subject: Re: [R] subsetting a list of dataframes Thank you all, this is exactly what I had in

[R] Help with 2-D plot of k-mean clustering analysis

2011-05-18 Thread Meng Wu
Hi, all I would like to use R to perform k-means clustering on my data which included 33 samples measured with ~1000 variables. I have already used kmeans package for this analysis, and showed that there are 4 clusters in my data. However, it's really difficult to plot this cluster in 2-D format

Re: [R] Changing order of facet grid in ggplot2

2011-05-18 Thread Scott Chamberlain
data$tp - factor(data$tp, levels = c(TP-ANY,TP-SUB,TP-CLIN)) qplot(life,geom=bar,weight=sym,ylim=c(0,1),legend=F,data=data) + facet_grid(. ~ tp) On Wednesday, May 18, 2011 at 9:14 AM, Christopher Desjardins wrote: Hi I am running the following code: sym - c(sym1,sym2,sym4) lifedxm -

Re: [R] Change pattern in histograms in ggplot2

2011-05-18 Thread Scott Chamberlain
There are a number of discussion threads on the google groups ggplot2 page: here are two of them. http://groups.google.com/group/ggplot2/browse_thread/thread/ca546f7f4d636deb/e0763a54b7735c35?lnk=gstq=fill+pattern#e0763a54b7735c35

[R] Convolution confusion:

2011-05-18 Thread Alex Hofmann
Hi, I'm new to R, and I'm a bit confused with the convolve() function. If I do: x-c(1, 2, 3) convolve(x, rev(x), TRUE, open) = 9 12 10 4 1 But I expected: 3 8 14 8 3 (like in Octave/MATLAB - conv(x, reverse(x)) ) 3 2 1 x 1 2 3 = 3 2 1 0 6 4 2 0 0 9 6 3 = 3 8 14 8 3 The thing is, that

Re: [R] R example code of Split-plot Manova

2011-05-18 Thread riccardo
Hi, I'm a PhD student in Milan (Italy). I read the OBrienKaiser example in ?Anova in the car package. I think that this is not a Manova split-plot design. I need to know if someone knows a R code for MANOVA split-plot. Is there someone who can help me? Thanks for kindness Riccardo -- View this

[R] retrieving gbif data

2011-05-18 Thread Rafael Rubio de Casas
Hi, I am trying to use the gbif function in the dismo package and it does not seem to work. I get the same error message every time: Error in if (sp) geo - TRUE : argument is not interpretable as logical It does not matter whether I query for my species of interest or if I copy and paste those

Re: [R] Integral Symbol

2011-05-18 Thread Javi Hidalgo
Thanks! This is what I was looking for. Apparently, it is not supported then it should be as integral, but in the pdf version appears the integral symbol. Regards, Javier. Date: Wed, 18 May 2011 09:39:28 -0400 From: murdoch.dun...@gmail.com To: havyhida...@hotmail.com CC:

Re: [R] Help with 2-D plot of k-mean clustering analysis

2011-05-18 Thread David Cross
I wonder if it makes sense to reduce the dimensionality of the variables somehow? David Cross d.cr...@tcu.edu www.davidcross.us On May 18, 2011, at 9:41 AM, Meng Wu wrote: Hi, all I would like to use R to perform k-means clustering on my data which included 33 samples measured with

[R] Loop stopping after 1 iteration

2011-05-18 Thread armstrwa
Hi all, This is a very basic question, but I just can't figure out why R is handling a loop I'm writing the way it is. Here is the script I have written: grid_2_series-function(gage_handle,data_type,filename) series_name-paste(gage_handle,data_type,sep=_)

Re: [R] Integral Symbol

2011-05-18 Thread Timothy Bates
Can’t you just embed it in the html as a symbol? #x222b; or int; I’d have thought you also just put it into straight into the document as a character – ∫– , as long as the html is stored as unicode U+222B http://en.wikipedia.org/wiki/Integral_symbol On 18 May 2011, at 4:04 PM, Javi Hidalgo

Re: [R] Help with 2-D plot of k-mean clustering analysis

2011-05-18 Thread Peter Langfelder
On Wed, May 18, 2011 at 7:41 AM, Meng Wu mengwu1...@gmail.com wrote: Hi, all  I would like to use R to perform k-means clustering on my data which included 33 samples measured with ~1000 variables. I have already used kmeans package for this analysis, and showed that there are 4 clusters in

Re: [R] Loop stopping after 1 iteration

2011-05-18 Thread Martyn Byng
Hi, The answer to (2) is that num_obs is a scalar, so length(num_obs) is 1. You probably wanted to do for (i in 1:num_obs) instead. Best wishes Martyn -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of armstrwa Sent: 18 May 2011

Re: [R] Loop stopping after 1 iteration

2011-05-18 Thread armstrwa
I knew it would be something simple. Thanks for catching that, Martyn. Billy -- View this message in context: http://r.789695.n4.nabble.com/Loop-stopping-after-1-iteration-tp3532988p3533041.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Loop stopping after 1 iteration

2011-05-18 Thread David Winsemius
On May 18, 2011, at 11:18 AM, armstrwa wrote: Hi all, This is a very basic question, but I just can't figure out why R is handling a loop I'm writing the way it is. Here is the script I have written: grid_2_series-function(gage_handle,data_type,filename)

Re: [R] Loop stopping after 1 iteration

2011-05-18 Thread Hugo Mildenberger
William, num_obs obviously isn't a vector, therefore length(num_obs) will evaluate to one. Hence your for loop control part will expand to for (i in 1:1) while it should probably read: for (i in 1:num_obs) Best Hugo On Wednesday 18 May 2011 17:18:15 armstrwa wrote: Hi

[R] Dataset Quasi Poisson

2011-05-18 Thread ilpoeta84
Hello, I'm looking for a dataset for Quasipoisson regression. The result must be significantly different from the classic poisson regression. You can help me? Please It is for my last university exam Thanks a lot -- View this message in context:

Re: [R] Email out of R (code)

2011-05-18 Thread Kevin Wright
How does this compare to create.post() ? Kevin On Tue, May 17, 2011 at 3:44 PM, Daniel Malter dan...@umd.edu wrote: Hi all, I thought I would post code to send an email out of R. The code uses Grothendieck and Bellosta's interface package rJython for executing Python from R. The code

Re: [R] Loop stopping after 1 iteration

2011-05-18 Thread armstrwa
Didn't mean to snub you guys, Hugo and David. I didn't see your posts before. Thanks for the advice. -- View this message in context: http://r.789695.n4.nabble.com/Loop-stopping-after-1-iteration-tp3532988p3533217.html Sent from the R help mailing list archive at Nabble.com.

[R] logistic regression lrm() output

2011-05-18 Thread array chip
Hi, I am trying to run a simple logistic regression using lrm() to calculate a odds ratio. I found a confusing output when I use summary() on the fit object which gave some OR that is totally different from simply taking exp(coefficient), see below:

[R] strucchange package Linux help

2011-05-18 Thread Hasan Diwan
When I run the code below on Macintosh and Windows, the plot comes out fine. However, on Linux, the png generated is invalid from R console, and loading strucchange crashes rkward. Is this a known issue on Linux and, if so, is there a workaround? Many thanks! require(strucchange) data(RealInt)

Re: [R] Email out of R (code)

2011-05-18 Thread Daniel Malter
I do not know. I was not aware and could hardly find any information on create.post(). From what I have seen at first glance, it seems that create.post() either opens your standard email program or web browser, which the python code does not. Instead it needs the R-library interfacing Python. I

Re: [R] Help with 2-D plot of k-mean clustering analysis

2011-05-18 Thread Claudia Beleites
Hi Meng, I would like to use R to perform k-means clustering on my data which included 33 samples measured with ~1000 variables. I have already used kmeans package for this analysis, and showed that there are 4 clusters in my data. However, it's really difficult to plot this cluster in 2-D

Re: [R] Help with 2-D plot of k-mean clustering analysis

2011-05-18 Thread Albyn Jones
One idea: Pick the three largest clusters, their centers determine a plane. project your data into that plane. albyn On Wed, May 18, 2011 at 06:55:39PM +0200, Claudia Beleites wrote: Hi Meng, I would like to use R to perform k-means clustering on my data which included 33 samples

Re: [R] logistic regression lrm() output

2011-05-18 Thread Frank Harrell
Why is a one unit change in x an interesting range for the purpose of estimating an odds ratio? The default in summary() is the inter-quartile-range odds ratio as clearly stated in the rms documentation. Frank array chip wrote: Hi, I am trying to run a simple logistic regression using lrm()

Re: [R] Smooth contour of a map

2011-05-18 Thread Pierre Bruyer
It's perfect, thank you! I would like post the final code if someone need help in this subject, but I try to correct a last problem, how can I constrain the contourLines() function to take the corner points of the map in his result ... it does not consider this point like a contour point. Le

[R] assign $y of predict() function output to variable

2011-05-18 Thread Asan Ramzan
Hello R-help Below is the output from the predict() function. How can I assign $y to a variable. predict(function,df2) $x    V1 1   36.28 2   34.73 3   33.74 4   69.87 5   58.88 6   89.44 7   43.97 8   41.94 9   33.34 10  38.47 11  35.16 12  42.94 13  46.76 14  53.24 15  52.43 16  50.40 17 

[R] Overlaying maps

2011-05-18 Thread Michael . Laviolette
I'm having difficulty overlaying maps when writing to a file graphics device. My command sequence has the structure plot(map1) par(new = T) plot(map2) On the screen device, it works fine. When I attempt something like png(file = map.png) plot(map1) par(new = T) plot(map2) dev.off() only the

[R] Email out of R (code)

2011-05-18 Thread Wolfgang RAFFELSBERGER
In case you're using Unix/Linux, have a look at www.r-project.org/doc/Rnews/Rnews_2007-1.pdf (page 30 - 32) Wolfgang . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wolfgang Raffelsberger, PhD IGBMC, 1 rue Laurent Fries, 67404 Illkirch Strasbourg, France Tel (+33) 388

[R] text mining problem using TM package

2011-05-18 Thread Andy Adamiec
Hi, I’m using R (TM package) for text mining and I’m having problems filtering articles out of my data set by local meta data. Here is the code: *data - (C:/… /19970331)* * * * * *rs - ReutersSource(data , encoding = UTF-8)* *RC - VCorpus(DirSource(data), readerControl = list(reader =

Re: [R] strucchange package Linux help

2011-05-18 Thread Achim Zeileis
On Wed, 18 May 2011, Hasan Diwan wrote: When I run the code below on Macintosh and Windows, the plot comes out fine. However, on Linux, the png generated is invalid from R console, and loading strucchange crashes rkward. I can replicate nothing of this. I ran the script both in a plain R

[R] Help with Memory Problems (cannot allocate vector of size)

2011-05-18 Thread Amit Patel
While doing pls I found the following problem BHPLS1 - plsr(GroupingList ~ PCIList, ncomp = 10, data = PLSdata, jackknife = FALSE, validation = LOO) when not enabling jackknife the command works fine, but when trying to enable jackknife i get the following error. BHPLS1 -

Re: [R] R-code in R-file documentation

2011-05-18 Thread Yihui Xie
I guess what you want is cat(readLines(file.r), sep = \n) Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Wed, May 18, 2011 at 4:03 AM, Brian Oney zenli...@gmail.com wrote:

Re: [R] hierarchical clustering within a size limit

2011-05-18 Thread rna seq
Hi Peter, Thanks for your help. A second simple question that I cannot solve is the following. labels = cutree(hc, h=500) # members of cluster 1: x[labels==1] # members of cluster 2: x[labels==2] When x is = 8 the index numbers appear in the output: [['[1]', '180066408', '180066464',

[R] Grouped bar plot

2011-05-18 Thread jctoll
Hi, I am trying to produce a grouped bar plot from a data.frame and I'm having difficulties figuring out how to do so. My data is 500 rows by 4 columns and basically looks like so: head(x) V1V2V3V4 1 XOM 0.2317915 0.1610068 1.6941637 2 AAPL 0.6735488 0.7433611

[R] data network format and grouping analysis

2011-05-18 Thread Sebastián Daza
Hi everyone, I have a dataset of friendship with this format: ego alter 47461 2 97421 3 14738 1NA 47472NA 974323 14739 21 4748313 97443 5 14740 314 47494NA 97454NA 14741 4NA 47505NA 9746513

Re: [R] Dataset Quasi Poisson

2011-05-18 Thread Jonathan Daily
1) This mailing list is not for homework. 2) I would recommend reading the introduction to R that comes with every installation of R, since your answer is in there. Alternatively, you could google R and quasi poisson. On Wed, May 18, 2011 at 11:42 AM, ilpoeta84 antonioperfe...@gmail.com wrote:

[R] Simple ordering or sorting question

2011-05-18 Thread David Kaplan
Greetings, I'm trying to simply reorder a data frame on the row numbers. So, for example, instead of getting 1,2,3,4,5,6,7,8,9,10,11, ... 100 ..., I get instead 1, 10, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 11, ... I've tried commands such as df - df[order(rownames(df)),] and

Re: [R] Simple ordering or sorting question

2011-05-18 Thread jim holtman
It looks like your row numbers are characters because that is the sort sequence you are getting. Try df - df[order(as.numeric(rownames(df))), ] On Wed, May 18, 2011 at 2:42 PM, David Kaplan dkap...@education.wisc.edu wrote: Greetings, I'm trying to simply reorder a data frame on the row

Re: [R] Simple ordering or sorting question

2011-05-18 Thread David Kaplan
That did it. Thanks!! David === David Kaplan, Ph.D. Professor Department of Educational Psychology University of Wisconsin - Madison Educational Sciences, Room, 1082B 1025 W. Johnson Street Madison, WI 53706 email:

[R] Use paste function to select column of data

2011-05-18 Thread John Poulsen
Hello, I want to build a function to call up a column of a data.frame by the names of the columns. I have column names that are sequentially named (col1, col2, etc.). How do I change a character expression into something that will be understood as a data.frame column. For example:

Re: [R] assign $y of predict() function output to variable

2011-05-18 Thread David Winsemius
On May 18, 2011, at 1:35 PM, Asan Ramzan wrote: Hello R-help Below is the output from the predict() function. How can I assign $y to a variable. Newvar - predict(function,df2)$y -- David. $x V1 1 36.28 2 34.73 3 33.74 4 69.87 5 58.88 6 89.44 7 43.97 8 41.94 9

Re: [R] Use paste function to select column of data

2011-05-18 Thread David Winsemius
On May 18, 2011, at 3:12 PM, John Poulsen wrote: Hello, I want to build a function to call up a column of a data.frame by the names of the columns. I have column names that are sequentially named (col1, col2, etc.). How do I change a character expression into something that will be

Re: [R] Use paste function to select column of data

2011-05-18 Thread Peter Ehlers
On 2011-05-18 12:12, John Poulsen wrote: Hello, I want to build a function to call up a column of a data.frame by the names of the columns. I have column names that are sequentially named (col1, col2, etc.). How do I change a character expression into something that will be understood as a

Re: [R] Grouped bar plot

2011-05-18 Thread Peter Ehlers
On 2011-05-18 11:13, jctoll wrote: Hi, I am trying to produce a grouped bar plot from a data.frame and I'm having difficulties figuring out how to do so. My data is 500 rows by 4 columns and basically looks like so: head(x) V1V2V3V4 1 XOM 0.2317915 0.1610068

Re: [R] Grouped bar plot

2011-05-18 Thread J Toll
On Wed, May 18, 2011 at 2:38 PM, Peter Ehlers ehl...@ucalgary.ca wrote: On 2011-05-18 11:13, jctoll wrote: Hi, I am trying to produce a grouped bar plot from a data.frame and I'm having difficulties figuring out how to do so.  My data is 500 rows by 4 columns and basically looks like so:

Re: [R] Overlaying maps

2011-05-18 Thread Ray Brownrigg
Using my mind-reading skills, plot.Map(), while deprecated, does provide an add= option. If this doesn't help, you'll need to read the posting guide and provide (a lot) more information. Ray Brownrigg On Thu, 19 May 2011, michael.laviole...@dhhs.state.nh.us wrote: I'm having difficulty

Re: [R] data network format and grouping analysis

2011-05-18 Thread Scott Chamberlain
The following works to get an igraph object from a matrix edgelist: dat2 - matrix(rep(seq(1,5,1), 4), nrow=10, ncol=2) graph.edgelist( dat2 ) I tried with NA's but graph.edgelist did not allow NA's. Wouldn't you just leave those rows out with NA's in them? An NA means there is no edge, right?

[R] Covariable Logistic Regression In R

2011-05-18 Thread Anamaria Crisan
Hello, I would like some help figuring out how to run Covariable Logistic Regression in R. I've been searching for a while on how to get this done in R (I have had the luck previously of using a software package that just does it) and I am coming up empty handed. Any experience or insights would

Re: [R] Convolution confusion:

2011-05-18 Thread peter dalgaard
On May 18, 2011, at 15:47 , Alex Hofmann wrote: Hi, I'm new to R, and I'm a bit confused with the convolve() function. If I do: x-c(1, 2, 3) convolve(x, rev(x), TRUE, open) = 9 12 10 4 1 But I expected: 3 8 14 8 3 (like in Octave/MATLAB - conv(x, reverse(x)) ) 3 2 1 x 1 2 3 = 3 2

[R] ggplot geom_boxplot vertical margins

2011-05-18 Thread Justin Haynes
If you plot: df-data.frame(x=factor(1:100),y=rnorm(1000)) ggplot(df,aes(x=x,y=y))+geom_boxplot() How do I remove those pesky margins on the sides of the plot area? Or maybe just reduce their size to something more like the spacing of the boxes? Thanks, Justin

Re: [R] ggplot geom_boxplot vertical margins

2011-05-18 Thread Felipe Carrillo
Is this what you want? You can control how much space you want to see on the sides of the plot: df-data.frame(x=factor(1:100),y=rnorm(1000)) ggplot(df,aes(x=x,y=y))+geom_boxplot() + scale_x_discrete(expand=c(0,0))   Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US

Re: [R] ggplot geom_boxplot vertical margins

2011-05-18 Thread Justin Haynes
Exactly! Thanks, I couldn't find that anywhere! On Wed, May 18, 2011 at 1:59 PM, Felipe Carrillo mazatlanmex...@yahoo.com wrote: Is this what you want? You can control how much space you want to see on the sides of the plot: df-data.frame(x=factor(1:100),y=rnorm(1000))

[R] June ** R ** /S+ Courses: Nationwide Back2back (1) R/S+ Fundamentals and (2) R/S-Plus Advanced Programming. in San Francisco, New York City, Washington DC

2011-05-18 Thread Sue Turner
XLSolutions has scheduled the first 2011 back2back courses in New York City, San Francisco, Washington DC. Taught by top R/S+ gurus! West Coast ---back2back--- East Coast (1) R/S-PLUS Fundamentals and Programming Techniques http://www.xlsolutions-corp.com/coursedetail.asp?id=30 * San

Re: [R] Help with Memory Problems (cannot allocate vector of size)

2011-05-18 Thread Jannis
How about reading the posting guide and afterwards searching the list archive: http://r.789695.n4.nabble.com/R-help-f789696.html Searching for Error: cannot allocate vector of size will give you hundreds of results as this question is asked VERY frequently! Jannis On 05/18/2011 07:55

Re: [R] Plots: I've deleted axes, now to delete space

2011-05-18 Thread Jannis
On 05/16/2011 06:18 PM, adele_thomp...@cargill.com wrote: Re-sizing within the dev command works well. I'm not sure why I would need the dev.off(). I have the plot commands run. Then I have the dev.copy2pdf command. Thanks again for your help. Well, you really should get into the habit of

Re: [R] Covariable Logistic Regression In R

2011-05-18 Thread Frank Harrell
First of all, use the correct terminology for the statistical method. It is not productive to identify 'significant' genes unless you use quite complex methods. This kind of endeavor would take at least 6 statistics courses in order to be successful. Frank Anamaria Crisan wrote: Hello, I

Re: [R] Plots: I've deleted axes, now to delete space

2011-05-18 Thread Adele_Thompson
I've never used an R command without reading the documentation first. I think that would be impractical. I am not an expert at deciphering the documentation though and I post here because I did in fact read the documentation, do extensive google searches, ask friends/collegues and still find no

Re: [R] R Style Guide -- Was Post-hoc tests in MASS using glm.nb

2011-05-18 Thread Bill.Venables
Hi Bert, I think people should know about the Google Sytle Guide for R because, as I said, it represents a thoughtful contribution to the debate. Most of its advice is very good (meaning I agree with it!) but some is a bit too much (for example, the blanket advice never to use S4 classes and

[R] using hglm to fit a gamma GLMM with nested random effects?

2011-05-18 Thread Benjamin Caldwell
Apologies for continuing to ask about this but . . in my quest to fit a gamma GLMM model to my data (see partial copy of thread below), I'm exploring using hglm today. The question of the day has to do with the errors I'm currently getting from the hglm package. Can hglm handle a model with

Re: [R] R Style Guide -- Was Post-hoc tests in MASS using glm.nb

2011-05-18 Thread Rolf Turner
On 19/05/11 10:26, bill.venab...@csiro.au wrote: SNIP Most of [the Google style guide's] advice is very good (meaning I agree with it!) but some is a bit too much (for example, the blanket advice never to use S4 classes and methods - that's just resisting progress, in my view). SNIP I must

  1   2   >