[R] error with RNetLogo on a mac

2013-09-06 Thread Ricardo Pietrobon
gist with code and respective errors: http://goo.gl/r6VrHl

would appreciate any input on how to get around the java vm problem.
btw, the very idea of connecting R and netlogo is superb

copying Jan in case he might have some input

many thanks

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


Re: [R] tm::stemDocument function not work

2013-09-04 Thread Ricardo Pietrobon
thanks Pascal. actually, right after I sent the post I realized that I
didn't send my sessionInfo (at the bottom of this message now). Just
to make sure, everything in my script works except for the line with
stemDocument, which was commented in my gist. Below is the specific
warning I am getting:

 corpus  - tm_map(corpus, stemDocument, language = english)
Warning message:
In parallel::mclapply(x, FUN, ...) :
  all scheduled cores encountered errors in user code



 sessionInfo()
R version 3.0.1 (2013-05-16)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

On Wed, Sep 4, 2013 at 12:54 AM, Pascal Oettli kri...@ymail.com wrote:
 Hello,

 Your example worked for me.

 R sessionInfo()
 R version 3.0.1 Patched (2013-09-02 r63805)
 Platform: x86_64-unknown-linux-gnu (64-bit)

 locale:
  [1] LC_CTYPE=en_GB.UTF-8   LC_NUMERIC=C
  [3] LC_TIME=en_GB.UTF-8LC_COLLATE=en_GB.UTF-8
  [5] LC_MONETARY=en_GB.UTF-8LC_MESSAGES=en_GB.UTF-8
  [7] LC_PAPER=C LC_NAME=C
  [9] LC_ADDRESS=C   LC_TELEPHONE=C
 [11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C

 attached base packages:
 [1] stats graphics  grDevices utils datasets  methods   base

 other attached packages:
 [1] scatterplot3d_0.3-33 lsa_0.63-3   RWeka_0.4-19
 [4] Snowball_0.0-10  ggplot2_0.9.3.1  tm_0.5-9.1

 loaded via a namespace (and not attached):
  [1] colorspace_1.2-2   dichromat_2.0-0digest_0.6.3   grid_3.0.1
  [5] gtable_0.1.2   labeling_0.2   MASS_7.3-29munsell_0.4.2
  [9] parallel_3.0.1 plyr_1.8   proto_0.3-10
 RColorBrewer_1.0-5
 [13] reshape2_1.2.2 rJava_0.9-4RWekajars_3.7.10-1 scales_0.2.3
 [17] slam_0.1-28stringr_0.6.2


 Regards,
 Pascal



 2013/9/4 Ricardo Pietrobon pietr...@gmail.com

 https://gist.github.com/rpietro/6430771

 stemDocument function doesn't seem to be working. Tried to look up and
 a few people have reported the problem, but no solution that I could
 find.

 would appreciate any help

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



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


[R] tm::stemDocument function not work

2013-09-03 Thread Ricardo Pietrobon
https://gist.github.com/rpietro/6430771

stemDocument function doesn't seem to be working. Tried to look up and
a few people have reported the problem, but no solution that I could
find.

would appreciate any help

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


Re: [R] Plotting Where People Live on a U.S. Map

2012-08-06 Thread Ricardo Pietrobon
Dan, google refine http://goo.gl/AeKml can actually transform zip codes
into longitude/latitude - http://goo.gl/1HDWb will show you how to do this
from street adresses, but it should also work from city names -- i think it
will allocate a default long/lat for a city, but not sure of the exact
mechanism

On Fri, Aug 3, 2012 at 1:10 PM, Lopez, Dan lopez...@llnl.gov wrote:

 Thank you!
 Dan

 From: Sarah Goslee [mailto:sarah.gos...@gmail.com]
 Sent: Thursday, August 02, 2012 5:51 PM
 To: Lopez, Dan
 Cc: R help (r-help@r-project.org)
 Subject: Re: [R] Plotting Where People Live on a U.S. Map

 Hi Dan,

 For question 1, yes you'll need geographic coordinates. I thinknit's
 possible to get a shapefile of zip codes, but maybe someone else will know
 the details.

 For #2, you  probably want maps instead of map, and you need to load a
 package before you can use it:
 install.packages(maps)
 library(maps)
 and then your code.

 Sarah

 On Thursday, August 2, 2012, Lopez, Dan wrote:
 Hi,

 QUESTION TOPIC #1
 I have some data I want to plot on a map. But what I have are home
 addresses: street, City, State, complete postal code--i.e 95377-1234. Is
 there a way to plot this data or do I need latitudinal and longitude
 coordinates? If so how do I convert them? Is there a package that will do
 the conversion in R?

 QUESTION TOPIC #2
 I was trying to experiment with this code that I found at the site below
 but got a message that indicated that the map function is not found. So I
 tried installing the maps package but got the below message. Is there an
 alternative way of doing this (please refer to URL below)?

 # The message I got:
  install.packages(map)
 Warning message:
 package 'map' is not available (for R version 2.15.0)

 # The code I tried to run:
 states - data.frame(map(state, plot=FALSE)[c(x,y)])
 colnames(states) - c(Lon,Lat)
 ggplot(states, aes(x=Lon, y=Lat)) + geom_path()
 + geom_point(alpha=0.6,size=0.3,data=subway)

 # Where I got the code from and also an image of what I am attempting to
 do (please enter this in your URL)

 http://www.google.com/imgres?um=1hl=enbiw=1790bih=845tbm=ischtbnid=4rMjXYA_w1qDiM:imgrefurl=http://www.informaniac.net/docid=SJqcsPghztrj0Mimgurl=http://lh5.ggpht.com/_yBbodrC25kU/Ta6Ifqr0ZLI/AAABRCg/98rIF-kMMns/map%25255B7%25255D.pngw=512h=319ei=mgsbUIzqJuKbiAL5v4DQDgzoom=1iact=hcvpx=176vpy=477dur=5741hovh=177hovw=285tx=110ty=113sig=117496213270544868088page=2tbnh=125tbnw=200start=32ndsp=40ved=1t:429,r:0,s:32,i:175

 Dan

 [[alternative HTML version deleted]]

 __
 R-help@r-project.orgjavascript:; mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


 --
 Sarah Goslee
 http://www.stringpage.com
 http://www.sarahgoslee.com
 http://www.functionaldiversity.org

 [[alternative HTML version deleted]]

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


[[alternative HTML version deleted]]

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


Re: [R] rrdf package for mac not working

2012-06-28 Thread Ricardo Pietrobon
Uwe, sorry for the HTML. In answer to your post: I did try to contact
the developer, no response. but a colleague pointed me to a way out
yesterday through the RCurl and XML packages:


library(RCurl)
library(XML)

endpoint - http://qcrumb.com/sparql;
query - PREFIX sdmx-measure:
http://purl.org/linked-data/sdmx/2009/measure# SELECT * FROM
http://estatwrap.ontologycentral.com/data/lfst_r_lfp3pop WHERE {?s
sdmx-measure:obsValue ?o.} LIMIT 3
accept=application/sparql-results+xml
results - getForm(endpoint, .params = c(query=query,accept=accept))
results - xmlParse(results)
results - xmlRoot(results)[[results]]
frame  - xmlToDataFrame(colClasses=c(character,double), nodes =
xmlChildren(results))
max(frame[2],na.rm=TRUE)



On Tue, Jun 26, 2012 at 9:52 AM, Uwe Ligges
lig...@statistik.tu-dortmund.de wrote:

 Please contact the package maintainer.

 Best,
 Uwe Ligges


 On 26.06.2012 00:41, Ricardo Pietrobon wrote:

 rrdf is incredibly helpful, but I've notice that the rrdf package for mac
 hasn't been working for some time: http://goo.gl/5Ukpn . wondering if there
 is still a plan to maintain that in the long run, or if there is some other
 alternative to read RDF files.

        [[alternative HTML version deleted]]

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



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


[R] rrdf package for mac not working

2012-06-25 Thread Ricardo Pietrobon
rrdf is incredibly helpful, but I've notice that the rrdf package for mac
hasn't been working for some time: http://goo.gl/5Ukpn . wondering if there
is still a plan to maintain that in the long run, or if there is some other
alternative to read RDF files.

[[alternative HTML version deleted]]

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


Re: [R] Decision Trees or Markov Models for Cost Effectiveness

2012-06-16 Thread Ricardo Pietrobon
not quite an R package, but one way of taking advantage of R would be to
use something like treeplan http://goo.gl/wHsb6 along with RExcel
http://goo.gl/ToD77

On Thu, Jun 14, 2012 at 11:34 AM, stefan.d...@gmail.com 
stefan.d...@gmail.com wrote:

 Hi Noah,

 I did ask basically the same question about a year ago and there
 wasn't anything around
 (http://tolstoy.newcastle.edu.au/R/e14/help/11/06/3651.html)
 Although I agree that R would be very suitable for this kind of
 calculations exist. I guess one reason is that a decision tree is not
 really a branch of statistics. The  advanced user of a decision tree
 will more likely program something in Excel.
 If you find something, please let us know.

 Best,
 Stefan


 On Tue, Jun 12, 2012 at 12:28 AM, Noah Silverman noahsilver...@ucla.edu
 wrote:
  Hello,
 
  I was just assigned to perform a cost effectiveness study in healthcare.
  We are studying the cost effectiveness of a proposed diagnostic vs.
 current screening procedures.
 
  One of the team members suggest a commercial software package called
 TreeAge Pro.  Looking at the description, it appears to be a nice GUI to
 some very simple models that could be easily constructed in R.
 
  Are there any packages in R for this type of analysis?
  Additionally, does anyone have any suggestions in general regarding
 doing this type of analysis in R?
 
  Thank You,
 
  --
  Noah Silverman
  UCLA Department of Statistics
  8117 Math Sciences Building
  Los Angeles, CA 90095
 
 
 [[alternative HTML version deleted]]
 
  __
  R-help@r-project.org mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.

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


[[alternative HTML version deleted]]

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


Re: [R] Adding title to colorkey

2012-06-16 Thread Ricardo Pietrobon
Stephen, for ggplot2 you might want to check http://goo.gl/0Wx0B

On Sat, Jun 16, 2012 at 4:40 AM, Stephen Eglen s.j.eg...@damtp.cam.ac.ukwrote:


 A recent paper on visualisation (in Neuron, a leading neuroscience
 journal) surveyed how well previous articles in this journal labelled their
 graphs (e.g. axis labelling and describing their error bars).  Of
 particular interest is that (only) 40% of plots labelled what their
 colorkey was showing (variable and units).

 The paper is at http://dx.doi.org/10.1016/j.neuron.2012.05.001

 R is not yet that prominent (compared to matlab) in Neuroscience, so I
 doubt many of the graphs were generated by levelplot() and friends.
 However, how can the colorkey be labelled?  I notice that this topic has
 been raised before, e.g.

  http://tolstoy.newcastle.edu.au/R/e16/help/11/11/2281.html

 For now, I've done:

 library(lattice)
 library(grid)
 levelplot(matrix(1:9,3,3),
  par.settings = list(layout.widths = list(axis.key.padding = 4)))
 grid.text('title here', y=unit(0.5, npc),
  rot=90, x=unit(0.88, npc))

 i.e. adding some space between levelplot and colorkey.  The
 x,y positions of the grid.text call need fine-tuning once the plot is
 close to finalised.

 Does anyone have a better solution for vertical colorkeys?  e.g. can the
 plot objected be interrogated to work out what the central x,y value is?


 Thanks, Stephen

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


[[alternative HTML version deleted]]

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


Re: [R] Decision Trees or Markov Models for Cost Effectiveness

2012-06-14 Thread Ricardo Pietrobon
hi Noah, you might want to look at http://goo.gl/KqXpJ -- haven't played
with it, and was actually surprised because whenever i think about decision
trees -- which as you know are completely different from CART type of
models -- i tend to think of excel add-ons or treeage. interested in
learning what you think about the package



On Mon, Jun 11, 2012 at 6:28 PM, Noah Silverman noahsilver...@ucla.eduwrote:

 Hello,

 I was just assigned to perform a cost effectiveness study in healthcare.
  We are studying the cost effectiveness of a proposed diagnostic vs.
 current screening procedures.

 One of the team members suggest a commercial software package called
 TreeAge Pro.  Looking at the description, it appears to be a nice GUI to
 some very simple models that could be easily constructed in R.

 Are there any packages in R for this type of analysis?
 Additionally, does anyone have any suggestions in general regarding doing
 this type of analysis in R?

 Thank You,

 --
 Noah Silverman
 UCLA Department of Statistics
 8117 Math Sciences Building
 Los Angeles, CA 90095


[[alternative HTML version deleted]]

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


[[alternative HTML version deleted]]

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


Re: [R] R and Ruby integration using RSruby gem

2012-06-14 Thread Ricardo Pietrobon
you might want to look at http://goo.gl/g6hGK

On Mon, Jun 11, 2012 at 12:53 PM, Ashy43 ashy4...@gmail.com wrote:

 Hi All,

 Could anyone please tell the installation steps of RSruby gem on Windows
 XP.
 I have latest version of ruby  R installed on Windows.


 Thanks

 --
 View this message in context:
 http://r.789695.n4.nabble.com/R-and-Ruby-integration-using-RSruby-gem-tp4633020.html
 Sent from the R help mailing list archive at Nabble.com.

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


[[alternative HTML version deleted]]

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


Re: [R] where to find a host server with R

2012-06-14 Thread Ricardo Pietrobon
EC2 is an option http://goo.gl/uw0Ze

On Tue, Jun 12, 2012 at 4:03 PM, Xiaokuan Wei weixiaok...@yahoo.com wrote:

 Hi,

 I am building a website with using R and bioconductor packages. I am
 wondering where I can find a good quality hosting service which provides
 servers running R and allows me to install various bioconductor packages.
 Does anyone have such experience?

 Thank you.

 -Xiaokuan
[[alternative HTML version deleted]]


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



[[alternative HTML version deleted]]

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


Re: [R] Re-post data format question (apologies)

2009-02-07 Thread Ricardo Pietrobon
Drew, would look at the reshape package

On Sat, Feb 7, 2009 at 2:47 PM, Drew Garey coryda...@gmail.com wrote:

 Hello all,



 I have a *.csv file that looks like this (actual file is orders of
 magnitude
 larger):



 Site  taxa  no.ind

 forestLMA1

 forestLCY1

 forestSCO1

 meadow   LMA2

 meadow   LCY1

 meadow   PNT 3



 I am interested in, but have failed to create, code that efficiently
 converts it to a site-by-taxa matrix or data frame that looks like this:



LMALCYSCOPNT

 Forest  1  1  1  0

 Meadow  2  1  0  3





 With no repeating taxa names and zeros where a taxon is not listed for a
 site.  Any help would be greatly appreciated.



 Regards,



 Drew Garey

 Aquatic Ecoloy Lab Manager

 Virginia Commonwealth University

[[alternative HTML version deleted]]

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


[[alternative HTML version deleted]]

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


Re: [R] converting a data set to a format for time series analysis

2008-06-11 Thread Ricardo Pietrobon
Jim, it worked perfectly.  thanks a lot

On Mon, Jun 9, 2008 at 8:58 PM, jim holtman [EMAIL PROTECTED] wrote:
 This should do it:

 x - read.table(textConnection(subject hospitaldate_enrollment
 hospital_beds
 +  1   hospitalA   1/3/2002300
 +  2   hospitalA   1/6/2002300
 +  3   hospitalB   2/4/2002150
 +  4   hospitalC   3/2/2002200), header=TRUE)
 closeAllConnections()
 y - as.Date(x$date_enrollment, %m/%d/%Y)
 z - cbind(x, year=format(y, %Y), month=format(y, %m))
 # partition the data
 z.s - split(z, list(z$year, z$month, z$hospital), drop=TRUE)
 # now aggregate
 do.call(rbind, lapply(z.s, function(a) data.frame(hospital=a$hospital[1],
 cases=nrow(a),
 + year=a$year[1], month=a$month[1], beds=a$hospital[1])))
hospital cases year month  beds
 2002.01.hospitalA hospitalA 2 200201 hospitalA
 2002.02.hospitalB hospitalB 1 200202 hospitalB
 2002.03.hospitalC hospitalC 1 200203 hospitalC





 On Mon, Jun 9, 2008 at 1:51 PM, Ricardo Pietrobon [EMAIL PROTECTED]
 wrote:

 Jim, thanks a lot.  This does the trick for dates, but what I have
 been struggling the most with is actually the conversion from having
 one subject per row to having one month per row.  I didn't explain
 that well at all in my previous email and so let me try again.  The
 idea is that the current data set is displayed with one subject per
 row.  I would like to have it displayed having one hospital per month
 per row.  For example, the new data set would look like this:

 month   yearsite   number_enrolled_subjects
  hospital_beds
 1  2002   hospitalA   22
   300

 meaning that hospital A enrolled 22 subjects in 01/2002, and hospital
 A has 300 beds -- the beds variable is one variable in a vector that
 would display all the covariates for my ARIMA model

 your suggestion solved the problem for the dates, but the command I am
 looking for now is something that would count the number of subjects
 per site per month of a year and then displayed it in the format
 above.  any thoughts?

 I really appreciate your help




 On Mon, Jun 9, 2008 at 1:04 PM, jim holtman [EMAIL PROTECTED] wrote:
  Will something like this work for you:
 
  x - read.table(textConnection(subject hospitaldate_enrollment
  hospital_beds
  + 1   hospitalA   1/3/2002300
  + 2   hospitalA   1/6/2002300
  + 3   hospitalB   2/4/2002150
  + 4   hospitalC   3/2/2002200), header=TRUE)
  closeAllConnections()
  y - as.Date(x$date_enrollment, %m/%d/%Y)
  cbind(x, year=format(y, %Y), month=format(y, %m))
subject  hospital date_enrollment hospital_beds year month
  1   1 hospitalA1/3/2002   300 200201
  2   2 hospitalA1/6/2002   300 200201
  3   3 hospitalB2/4/2002   150 200202
  4   4 hospitalC3/2/2002   200 200203
 
 
 
 
  On Mon, Jun 9, 2008 at 12:45 PM, Ricardo Pietrobon [EMAIL PROTECTED]
  wrote:
 
  I currently have a data set describing human subjects enrolled into an
  international clinical trial, the name of the hospital enrolling this
  human subject, the date when the subject was enrolled, and a vector
  with variables representing characteristics of the site (e.g., number
  of beds in a hospital).  my data sets looks like this:
 
  subject hospitaldate_enrollment hospital_beds
  1   hospitalA   1/3/2002300
  2   hospitalA   1/6/2002300
  3   hospitalB   2/4/2002150
  4   hospitalC   3/2/2002200
 
  to perform a time series analysis I am now trying to get to a format
  that would give me the following variables:
 
  month   yearsitenumber_enrolled_subjectshospital_beds
 
  the data would be displayed on one-month intervals, and number of
  subjects clustered around sites.
 
  any help would be greatly appreciate
 
  thanks
 
 
  Ricardo
 
  __
  R-help@r-project.org mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide
  http://www.R-project.org/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.
 
 
 
  --
  Jim Holtman
  Cincinnati, OH
  +1 513 646 9390
 
  What is the problem you are trying to solve?



 --
 Jim Holtman
 Cincinnati, OH
 +1 513 646 9390

 What is the problem you are trying to solve?

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


[R] converting a data set to a format for time series analysis

2008-06-09 Thread Ricardo Pietrobon
I currently have a data set describing human subjects enrolled into an
international clinical trial, the name of the hospital enrolling this
human subject, the date when the subject was enrolled, and a vector
with variables representing characteristics of the site (e.g., number
of beds in a hospital).  my data sets looks like this:

subject hospitaldate_enrollment hospital_beds
1   hospitalA   1/3/2002300
2   hospitalA   1/6/2002300
3   hospitalB   2/4/2002150
4   hospitalC   3/2/2002200

to perform a time series analysis I am now trying to get to a format
that would give me the following variables:

month   yearsitenumber_enrolled_subjectshospital_beds

the data would be displayed on one-month intervals, and number of
subjects clustered around sites.

any help would be greatly appreciate

thanks


Ricardo

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


[R] diagnostic meta-analyses

2008-05-17 Thread Ricardo Pietrobon
List members,

has anybody developed functions or formal R packages to conduct
meta-analysis of diagnostic tests?  What I have in mind is something
along the lines of Meta-DiSc
(http://www.biomedcentral.com/1471-2288/6/31)

thanks

Ricardo

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


[R] computational ontology to research questions, and statistical methods

2008-05-05 Thread Ricardo Pietrobon
our group at Duke is currently attempting to connect two data sets fed
through a web-based system, one containing research questions (i.e.,
variables positioned with certain roles) and a database of statistical
methods.  this connection is done informally in a number of R packages
and related software such as Rcmdr, R4calc, and Rkward where a
variable of a certain type is matched to a certain test.  For example,
a logistic regression model requires a dichotomous variable as its
dependent variable.  our goal is to formalize this link through a
computational ontology, which would standardize and hopefully
facilitate package and library development for R.

we have started some parallel efforts regarding both our requirements
for this ontology as well a search for existing ontologies.  So far we
couldn't find any existing ontology, which seems odd given the
widespread application such an ontology has

Question for the list members:  Is anybody aware of any existing
ontologies computational focusing on this topic?

thanks


Ricardo

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


Re: [R] Input appreciated: R teaching idea + a way to improve R-

2007-10-23 Thread Ricardo Pietrobon
I agree with Frank - decentralization is key in a wiki environment
since it allows the system to dynamically correct itself.  That said,
there are some ongoing experiments trying to change this -- check, for
example, http://scholarpedia.org/ , which seems to be somewhat along
the lines Ted described.  You will notice that the content is of very
high quality, but apparently the site doesn't seem to expand its
content as fast as other environments that are completely
decentralized.

There is probably not a single answer to this issue, as different
degrees of centralization will serve different purposes to different
audiences in different environments and at different times ... such as
in ecological and evolutionary models



On 10/23/07, Frank E Harrell Jr [EMAIL PROTECTED] wrote:
 (Ted Harding) wrote:
  On 23-Oct-07 16:11:12, Tony Plate wrote:
  [...]
  Is there any way on the R-Wiki for people to quickly and easily add an
  annotation indicating that they believe some particular advice is poor
  practice?  Ideally, these annotations would be easily searchable  so
  that other users could find and fix or respond to them.
 
  -- Tony Plate
 
  I think the ideal medium for this kind of thing (and in my opinion
  it can -- and in the future will -- expand to the general domain
  of on-line publication) is on the following lines.
 
  A. Someone puts up a document. This is owned by its author
  and cannot be changed by anyone else. (There is also an argument
  for stipulating that on such a medium the author cannot change
  it either--the back-trace could be meaningful and important).
 
  B. There is one exception to (A). Anyone can mark a place in the
  document with a link to another contribution (which might be a
  further contribution, a comment, a correction, a link to something
  else altogether, ... ). All such links can also be followed in the
  reverse direction.
 
  C. Rules (A) and (B) appliy to all documents in the hierarchy.
 
  D. At some stage, the original author or anyone else can wrap up
  what has happened so far by creating a new root document. The
  previous version can be archived.
 
  E. There is a case for plain-text file format where the content
  can be expressed in words. More generally, though (and, of course,
  especially for content which includes graphics or mathematics),
  a generally-readable file format with the necessary capacilities
  should be used. This seems to me to imply PDF (and exclude such
  proprietary formats as Word or Excel, and unfortunately even PS
  which is not universally readable). Where data need to be included,
  this whould be possible using CSV files.
 
  Having said all that, I'm wondering what web format and software
  can conveniently implement such a structure. I have very little
  experience with Wikis (apart from reading them from time to time),
  so I don't really know how well a Wiki would lend itself to this.
 
  There are some other considerations which would be at least
  desirable.
 
  F. Searchability.
 
  G. A user should be able to bring up a tree representation,
  using edges to link nodes which, when clicked/hovered on,
  would pop up a box giving a brief descrption of what the
  link is about; and the user should be able to drop (prune)
  branches which are not of interest in order to simplify the
  task.
 
  I'd be very interested to see commments on these thoughts!
  Best wishes to all,
  Ted.

 Ted,

 The experience we're having with wikis has to my satisfaction shown that
 such levels of control, and keeping an initial draft intact, are not
 necessary and can be counter-productive.  Refactoring and sparing
 readers from out-of-date thoughts is a key to productivity and knowledge
 transfer.

 Cheers
 Frank


 
  
  E-Mail: (Ted Harding) [EMAIL PROTECTED]
  Fax-to-email: +44 (0)870 094 0861
  Date: 23-Oct-07   Time: 18:11:17
  -- XFMail --
 
  __
  R-help@r-project.org mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.
 


 --
 Frank E Harrell Jr   Professor and Chair   School of Medicine
   Department of Biostatistics   Vanderbilt University

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



-- 
Ricardo Pietrobon, MD, PhD, MBA
Associate Vice Chair and Assistant Professor, Department of Surgery
Director of Biomedical Informatics, Duke Translational Medicine Institute
http://www.dtmi.duke.edu/

my calendar is available at
http

Re: [R] Input appreciated: R teaching idea + a way to improve R-wiki

2007-10-21 Thread Ricardo Pietrobon
Bill, very interesting comment.  However, do you believe that by posting
these tutorials on a wiki they could, even if initially faulty, be improved
by the community over time?

Ricardo



On 10/22/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 I think you need to see how things work before making any decision on
 this.  While the principle seems OK, in a optimistic sort of way, you
 may be a little disappointed by the outcome.  Some will likely be
 superb, useful, well written and accessible.  Others, I suspect, will
 fall short of this ideal, with some falling a fair way short.  That's
 the way students learn, after all.  They should use these exercises to
 straighten things out in their own minds, and some of them seem to have
 rather twisted ideas, at least initially, even at graduate-level.

 Some people argue it's useful to see the learning process in action, and
 some books I could mention seem to be written this way - but they don't
 get very good reviews.  I just think there is a real danger here of
 giving misleading and inefficient teaching materials a spurious cloak of
 legitimacy, even if there are disclaimers all over it.  I see a need to
 be very cautious about this, in other words.


 Bill Venables
 CSIRO Laboratories
 PO Box 120, Cleveland, 4163
 AUSTRALIA
 Office Phone (email preferred): +61 7 3826 7251
 Fax (if absolutely necessary):  +61 7 3826 7304
 Mobile: +61 4 8819 4402
 Home Phone: +61 7 3286 7700
 mailto:[EMAIL PROTECTED]
 http://www.cmis.csiro.au/bill.venables/

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 On Behalf Of Matthew Keller
 Sent: Monday, 22 October 2007 9:45 AM
 To: R list
 Subject: [R] Input appreciated: R teaching idea + a way to improve
 R-wiki

 Hi all,

 I will be teaching a graduate-level course on R at CU Boulder next
 semester. I have a teaching idea that might also help improve the R
 wiki page... I wanted to know what you all thought of it and wanted to
 solicit some advice about doing it.

 During the latter part of the course, students will choose a topic of
 interest (e.g., hierarchical linear modeling), and show how to achieve
 it in R. They would present their findings to the class, and would
 also be responsible for writing a concise but well-written How To
 manual on the topic. These would be ~ 5-10 pages and would include
 basic background of the statistical procedure and a commented example
 with code in R. The goal would be for these to read like Baron  Li's
 Notes on the use of R for psychology experiments and questionnaires.

 Originally I was going to post these as PDFs on my own web-page and
 let them grow into a compendium of how-to manuals as I teach this
 course over the years. However, perhaps a better idea, and one that
 probably benefits more people, is to have my students post their short
 manuals (not as PDFs but rather typed in) on the R-wiki page.

 Does this seem like a good idea to folks?

 Another question has to do with how barren the current R wiki page
 is... is it still being actively developed or has the community given
 up on it?

 Finally, any thoughts on where on the R-wiki site we should post our
 How To manuals? The tips and tricks section seems to barely be
 more than snippets of conversations from this list-serve (often sans
 the context). My guess is that the Guides section is where these
 should go.

 Your input would be most appreciated. Best,

 Matt



 --
 Matthew C Keller
 Asst. Professor of Psychology
 University of Colorado at Boulder
 www.matthewckeller.com

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

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


[[alternative HTML version deleted]]

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


[R] R and FDA trials

2007-10-07 Thread Ricardo Pietrobon
Yesterday I just noticed the new document on R and regulatory aspects
for biomedical research posted at
http://www.r-project.org/doc/R-FDA.pdf

Coming from an institution that performs a large number of clinical
trials for FDA and being an advocate of R myself, I have found that
the following issues usually come up when discussing the use of R for
FDA trials:

1. Most FDA submissions come down to a series of r x k tables, and it
is hard to claim that one system is better than another for that.

2. Data is to be submitted to the FDA in SAS (considered by many as
the industry standard) or CDISC XML formats (http://www.cdisc.org/);
there are pretty good SAS tools for that;  does R have comparable?

3. Some packages in R provide acknowledgedly better functionality than
their SAS-equivalent, but an entire FDA validation would have to occur
each time an enhancement is made to the R package because often an
enhancement breaks something else or the syntax would change from one
release to another.

would be interested in opinions on how to respond to these comments


Ricardo

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


Re: [R] Updating packages for R 2.6.0

2007-10-04 Thread Ricardo Pietrobon
I must be making some really basic mistake, since I keep getting an
error message when using update.packages(checkBuilt=TRUE, ask=FALSE) -
an example for MASS is below.  I am running ubuntu 7.04, with a clean
install done today of version 2.6.0 straight from the R repository.
here is the message:


* Installing *source* package 'MASS' ...
** libs
gcc -std=gnu99 -I/usr/share/R/include -I/usr/share/R/include
-fpic  -g -O2 -c lqs.c -o lqs.o
In file included from lqs.c:31:
/usr/share/R/include/R.h:28:20: error: stdlib.h: No such file or directory
/usr/share/R/include/R.h:29:19: error: stdio.h: No such file or directory
In file included from /usr/lib/gcc/i486-linux-gnu/4.1.2/include/syslimits.h:7,
 from /usr/lib/gcc/i486-linux-gnu/4.1.2/include/limits.h:11,
 from /usr/share/R/include/R.h:30,
 from lqs.c:31:
/usr/lib/gcc/i486-linux-gnu/4.1.2/include/limits.h:122:61: error:
limits.h: No such file or directory
In file included from lqs.c:31:
/usr/share/R/include/R.h:32:18: error: math.h: No such file or directory
/usr/share/R/include/R.h:33:19: error: errno.h: No such file or directory
In file included from /usr/share/R/include/R.h:50,
 from lqs.c:31:
/usr/share/R/include/R_ext/RS.h:24:39: error: string.h: No such file
or directory
lqs.c: In function 'lqs_fitlots':
lqs.c:222: warning: implicit declaration of function 'fabs'
lqs.c:222: warning: incompatible implicit declaration of built-in
function 'fabs'
lqs.c:238: warning: implicit declaration of function 'sqrt'
lqs.c:238: warning: incompatible implicit declaration of built-in
function 'sqrt'
lqs.c:239: warning: incompatible implicit declaration of built-in
function 'fabs'
lqs.c: In function 'do_one':
lqs.c:319: warning: implicit declaration of function 'log'
lqs.c:319: warning: incompatible implicit declaration of built-in function 'log'
lqs.c:319: warning: incompatible implicit declaration of built-in
function 'fabs'
lqs.c: In function 'mve_fitlots':
lqs.c:376: warning: incompatible implicit declaration of built-in function 'log'
make: *** [lqs.o] Error 1
ERROR: compilation failed for package 'MASS'
** Removing '/usr/local/lib/R/site-library/MASS'
** Removing '/usr/local/lib/R/site-library/class'
** Removing '/usr/local/lib/R/site-library/nnet'
** Removing '/usr/local/lib/R/site-library/spatial'

The downloaded packages are in
/tmp/Rtmp7CXD5O/downloaded_packages
Warning message:
In install.packages() :
  installation of package 'VR' had non-zero exit status


any thoughts appreciated

On 10/4/07, Prof Brian Ripley [EMAIL PROTECTED] wrote:
 Since this has come up already:

 It is a good idea to re-install all packages for a minor-version increment
 of R, e.g. 2.5.1 - 2.6.0 (it is major.minor.patchlevel).  This is most
 easily done by

  update.packages(checkBuilt=TRUE, ask=FALSE)

 However, if you don't want to do that yet, be aware that

 - Certain S4-using packages must be reinstalled, and using old versions
 can make R malfunction.  I believe these are Brobdingnag, Matrix, NADA and
 kappalab.

 - Any S4 package that makes an existing function S4-generic will grab that
 function as it existed in the version of R under which they were
 installed.  If it has changed, there is potential trouble.

 - Packages that create or change character strings at C level will have
 needed to be updated for R 2.6.0 (and some have not yet been).  Using such
 a package can in principle result in other character data being changed
 (since most character strings now share storage).

 --
 Brian D. Ripley,  [EMAIL PROTECTED]
 Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
 University of Oxford, Tel:  +44 1865 272861 (self)
 1 South Parks Road, +44 1865 272866 (PA)
 Oxford OX1 3TG, UKFax:  +44 1865 272595

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


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


Re: [R] Updating packages for R 2.6.0

2007-10-04 Thread Ricardo Pietrobon
you got it.  works perfectly now.  thanks

On 10/4/07, Gabor Csardi [EMAIL PROTECTED] wrote:
 You need to install the libc6-dev ubuntu package to be able
 to compile programs.

 sudo apt-get install libc6-dev

 Gabor

 On Thu, Oct 04, 2007 at 09:54:26AM -0400, Ricardo Pietrobon wrote:
  I must be making some really basic mistake, since I keep getting an
  error message when using update.packages(checkBuilt=TRUE, ask=FALSE) -
  an example for MASS is below.  I am running ubuntu 7.04, with a clean
  install done today of version 2.6.0 straight from the R repository.
  here is the message:
 
 
  * Installing *source* package 'MASS' ...
  ** libs
  gcc -std=gnu99 -I/usr/share/R/include -I/usr/share/R/include
  -fpic  -g -O2 -c lqs.c -o lqs.o
  In file included from lqs.c:31:
  /usr/share/R/include/R.h:28:20: error: stdlib.h: No such file or directory
  /usr/share/R/include/R.h:29:19: error: stdio.h: No such file or directory
  In file included from 
  /usr/lib/gcc/i486-linux-gnu/4.1.2/include/syslimits.h:7,
   from /usr/lib/gcc/i486-linux-gnu/4.1.2/include/limits.h:11,
   from /usr/share/R/include/R.h:30,
   from lqs.c:31:
  /usr/lib/gcc/i486-linux-gnu/4.1.2/include/limits.h:122:61: error:
  limits.h: No such file or directory
  In file included from lqs.c:31:
  /usr/share/R/include/R.h:32:18: error: math.h: No such file or directory
  /usr/share/R/include/R.h:33:19: error: errno.h: No such file or directory
  In file included from /usr/share/R/include/R.h:50,
   from lqs.c:31:
  /usr/share/R/include/R_ext/RS.h:24:39: error: string.h: No such file
  or directory
  lqs.c: In function 'lqs_fitlots':
  lqs.c:222: warning: implicit declaration of function 'fabs'
  lqs.c:222: warning: incompatible implicit declaration of built-in
  function 'fabs'
  lqs.c:238: warning: implicit declaration of function 'sqrt'
  lqs.c:238: warning: incompatible implicit declaration of built-in
  function 'sqrt'
  lqs.c:239: warning: incompatible implicit declaration of built-in
  function 'fabs'
  lqs.c: In function 'do_one':
  lqs.c:319: warning: implicit declaration of function 'log'
  lqs.c:319: warning: incompatible implicit declaration of built-in function 
  'log'
  lqs.c:319: warning: incompatible implicit declaration of built-in
  function 'fabs'
  lqs.c: In function 'mve_fitlots':
  lqs.c:376: warning: incompatible implicit declaration of built-in function 
  'log'
  make: *** [lqs.o] Error 1
  ERROR: compilation failed for package 'MASS'
  ** Removing '/usr/local/lib/R/site-library/MASS'
  ** Removing '/usr/local/lib/R/site-library/class'
  ** Removing '/usr/local/lib/R/site-library/nnet'
  ** Removing '/usr/local/lib/R/site-library/spatial'
 
  The downloaded packages are in
  /tmp/Rtmp7CXD5O/downloaded_packages
  Warning message:
  In install.packages() :
installation of package 'VR' had non-zero exit status
 
 
  any thoughts appreciated
 
  On 10/4/07, Prof Brian Ripley [EMAIL PROTECTED] wrote:
   Since this has come up already:
  
   It is a good idea to re-install all packages for a minor-version increment
   of R, e.g. 2.5.1 - 2.6.0 (it is major.minor.patchlevel).  This is most
   easily done by
  
update.packages(checkBuilt=TRUE, ask=FALSE)
  
   However, if you don't want to do that yet, be aware that
  
   - Certain S4-using packages must be reinstalled, and using old versions
   can make R malfunction.  I believe these are Brobdingnag, Matrix, NADA and
   kappalab.
  
   - Any S4 package that makes an existing function S4-generic will grab that
   function as it existed in the version of R under which they were
   installed.  If it has changed, there is potential trouble.
  
   - Packages that create or change character strings at C level will have
   needed to be updated for R 2.6.0 (and some have not yet been).  Using such
   a package can in principle result in other character data being changed
   (since most character strings now share storage).
  
   --
   Brian D. Ripley,  [EMAIL PROTECTED]
   Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
   University of Oxford, Tel:  +44 1865 272861 (self)
   1 South Parks Road, +44 1865 272866 (PA)
   Oxford OX1 3TG, UKFax:  +44 1865 272595
  
   __
   R-help@r-project.org mailing list
   https://stat.ethz.ch/mailman/listinfo/r-help
   PLEASE do read the posting guide 
   http://www.R-project.org/posting-guide.html
   and provide commented, minimal, self-contained, reproducible code.
  
 
  __
  R-help@r-project.org mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.

 --
 Csardi Gabor [EMAIL PROTECTED]MTA RMKI, ELTE TTK



-- 
Ricardo Pietrobon, MD, PhD, MBA