similar to: How to load functions in R

Displaying 20 results from an estimated 7000 matches similar to: "How to load functions in R"

2009 Feb 11
5
How to comment in R
Hi everybody, I use for the moment "#" at the begining of each line for comments. Is there any possibility to comment more than one line, like something which shows the beggingng and the end of the comment? Or is there a possibility to comment only a part of a line? Thanks, Mihai [[alternative HTML version deleted]]
2008 Sep 13
4
bubble(circle) plot help.
I need help creating a bubbleplot, like a simple pseudo three dimensional scatterplot of circles whose sizes index a 3rd variable. I initially came across this at http://addictedtor.free.fr/graphiques/graphcode.php?graph=73 but the circleplot function does not exist in fbasic as listed in the document. _________________________________________________________________
2009 Jun 20
2
Special characters in Rd example section will cause errors
Hi (Duncan?), The other day I noticed some characters will cause errors in R CMD CHECK because of parse_Rd(), and AFAIK, these chars include '%', '{' and '}'. For example, note the comments in the example section: %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~% \name{testfun} \Rdversion{1.1} \alias{testfun} \title{ A Test } \description{ A test } \usage{ testfun() } \value{ NULL }
2008 Sep 10
2
relsurv package
Dear R-users, I have a couple of questions about the relsurv package: 1) when I try to run the example: fit <- rsmul(Surv(time,cens)~sex+as.factor(agegr)+ratetable(age=age*365.24,sex=sex,year=year),ratetable=slopop,data=rdata) with the datasets in the package (rdata and slopop) it gives me an error: Error in nrow(x) : object "x" not found 2) If I have a date format
2008 Sep 14
5
Error Running TinnR with R
Hello All, I am using Tinn-R (v 2.0.0.7) integrated with R (v 2.7.2) on a 32-bit Windows Vista system. When I try to run a code and send it to R from Tinn-R, I get the following error message; ?Error in source(.trPaths[5], echo = T) : object ".trPaths" not found? I was using an earlier version of Tinn-R and R and I was not having problems till recently when R-sending started freezing
2009 Apr 03
2
extract tables as data.frames from HTML source
Hi, I wonder whether there is any convenient function (or package) to extract tables from a HTML page? e.g. from http://www.google.com/finance/historical?q=SHE:002251 I know we can readLines('URL'), gsub('<td>...', '...', source), ... and at last get the numbers; I'm writing to ask whether someone has already contributed a more general function (with the package
2009 Mar 23
2
How to get commands history as a character vector instead of displaying them?
Hi Everyone, I want to get the commands history as a character vector instead of just displaying them, but the function history() just returns NULL. I checked the source code of 'history' and could not find a solution. Anybody has an idea? Thanks! P. S. My original problem is, when a user opens a graphics device like png() or pdf(), I want to know the file name used by this device. I
2010 Jan 19
2
Working with text data/text operators
Hello, Could someone tell me, how can I select from a dataframe only those columns whose names contain a certain text? For example, if the column names are "Bond1.Creditclass","Bond1.Price","Bond2.Creditclass","Bond2.Price", how do I select only the columns corresponding to Bond1? Thanks a lot, Mihai [[alternative HTML version deleted]]
2008 Sep 11
4
All possible pairs of two variables
I have two variables (x,y) : x : it takes all integer values from 0 to y and, y : takes all values from 0, 10 I am looking for some R code to find all possible pairs of (x,y). Can anyone please help me? New Email addresses available on Yahoo! Get the Email name you&#39;ve always wanted on the new @ymail and @rocketmail. Hurry before someone else does! [[alternative HTML version
2008 Sep 13
3
Beautify R scripts in microsoft word
I am generating a report containing several R scripts in the appendix. Is there any way to "beautify" the R source codes in microsoft word, similar to what we see in tinn-R ? Thanks _________________________________________________________________ [[alternative HTML version deleted]]
2009 Apr 03
1
new line between '}' and 'else' in function body
Hi list members, ?"else" tells us In particular, you should not have a newline between '}' and 'else' to avoid a syntax error in entering a 'if ... else' construct at the keyboard or via 'source'. but there's no syntax error when you break the line between "}" and "else" in a function, e.g. f = function(x) {
2008 Nov 14
1
Line breaks in mathematical formulae in Rd files (PR#13287)
Hi, This is a problem about writing R documentation (R-exts 2.6). The command "\deqn" defined in "Rd.sty" is: \newcommand{\deqn}[2]{\[#1\]} which will put mathematical formulae in the "displaymath" environment; that means line breaks are not allowed (or will not be shown) in formulae, but sometimes we do need multiple lines of formulae. One solution is to write
2008 Sep 15
1
any package to do generalized linear mixed model?
I checked GlmmML package. However, it can only do binomial and poisson distribution. How about others such as gamma or neg binomial? Thank you so much! wensui
2009 Sep 22
3
R PNG graph width limitation
Hi folks, I am trying to do a clustering and generate a long dendrogram in R on Linux server: ========= data<-read.table(file="mean_ratio.txt.noheader",row.names=1,sep="\t",quote="\"") hc<-hclust(dist(data),"ward") png(file="mean_ratio.txt.noheader.ward.png",bg="white",pointsize=8,width=32767,height=1536) plot(hc,hang=-1)
2008 Oct 21
3
code works in R desktop but not iin RWeb - How do I modify to get it working in RWeb, please?
Hi, How are you? I have a quick question.... I have code that works perfectly with R desktop, but does not work with RWeb. Could you please tell me how to modify the code below so it will work with RWeb? #Read in txt file happyguys<-read.table("c:/test8.txt", header=TRUE, row.names=1) #Subset the txt file to only include certain values test<-subset(happyguys, GRADE == 7
2014 Dec 09
3
UTF8 markdown vignette
On 09/12/2014, 4:38 PM, ONKELINX, Thierry wrote: > Dear Yihui, > > I have created a reproducible example at https://github.com/ThierryO/utf8vignette > > The \usepackage{} line is needed, otherwise R CMD check --as-cran will give a warning. > %\VignetteEncoding{UTF-8} did not solve the problem. I've just taken a look at the sources, and that's only in R-devel, it never
2008 Sep 18
2
How to show complete time values in a plot x axis
Hello, I have the following data and I try to properly import it in R and plot the 4th column relative to time 1 2008-249 17:44:17.973 -2.27 00000000: Accepted 2 2008-249 17:44:18.014 -2.28 00000000: Accepted 3 2008-249 17:44:18.064 -2.29 00000000: Accepted 4 2008-249 17:44:18.123 -2.29 00000000: Accepted 5 2008-249 17:44:18.174 -2.29 00000000:
2008 Sep 11
5
How to obtain a sequence of dates consisting of only weekdays
Dear R-users, How do I obtain a sequence of dates consisting of only weekdays without the weekends in R? In S, I can do the following: timeSeq(from="12/17/2007", to="8/25/2008", by="weekdays") I tried using looking at timeSequence (fSeries package) and seq.Date (base package) but I do not know if I can specify "weekdays" rather than "day".
2010 Mar 12
3
rmaxwell in C
Hi R useRs: How can I generate a random sample from Maxwell Distribution in C language? Since I know the function rmaxwell {VGAM}, I tried the function r2c {r2c}. But I still cannot find the source code. Thanks for your kind help. RegaRds, 2010-03-12 Randel [[alternative HTML version deleted]]
2008 Nov 29
3
how to input a string without quote
Hi there, I hope to use a string as an input in my function, however, I don't want to input the quotation mark. Is it possible? Thanks in advance. Regards, Jinsong