Skip to content

icon for an R package

18 messages · Michael Friendly, David Winsemius, Marc Schwartz +5 more

#
I'm looking for an icon to represent an R package.  Perhaps something like

http://cdn2.iconfinder.com/data/icons/DarkGlass_Reworked/128x128/apps/package.png

but with the R logo rather than KDE.
#
On Dec 29, 2010, at 10:03 AM, Michael Friendly wrote:

            
Can't you just get the location of an "R" at CRAN?

http://cran.r-project.org/Rlogo.jpg

  
    
#
On Dec 29, 2010, at 11:32 AM, Michael Friendly wrote:

            
Michael,

Are you referring to an icon that would be displayed for an R package when browsing in a file manager, such as Nautilus, Konqueror or Finder?

If so, those icons are typically associated with a file using MIME types and are based upon the file type in question having a unique extension and perhaps being associated with a particular application that is installed.

Since R packages are either .zip files or tar archive files (.tar.gz or .tgz), they will use the default theme icons for the OS/File Manager in use for those extensions, possibly for the archiving application associated with those file types.

I don't know of any way off-hand, to differentiate R packages from other files that have the same extensions and therefore have a unique icon displayed in the respective file manager application.

Regards,

Marc Schwartz
#
Attached is a png file that is the superposition of an R logo and a  
Mac-ish package icon. Best I can do with my limited tools.
On Dec 29, 2010, at 12:32 PM, Michael Friendly wrote:

            
David Winsemius, MD
West Hartford, CT
#
On 12/29/2010 1:01 PM, Marc Schwartz wrote:
Well, my initial query was just for an icon that I could use in a 
presentation to represent several R packages
and the relations among them.
You raise the more interesting question of OS-specific icons for 
R-related file types (.R, .Rd, .RData, .Rnw),
but the only ones I know of are the .RData icon under Windows, and icons 
used in eclipse/StatET.

  
    
#
On Dec 29, 2010, at 2:08 PM, Michael Friendly wrote:

            
I see, so a network tree of sorts....

David's image file did not come thru the list, so I am not sure if that or something similar meets your needs.

Simon has some image icons that he uses in R.app for the OSX GUI. These are available from:

  https://svn.r-project.org/R-packages/trunk/Mac-GUI/images/
Presumably if a motivated person were to create and offer some under an appropriate and compatible license, they could be made generally available. Of course the actual utilization of them by the various file managers across the OS's in the manner I describe would require additional steps. Either via an install program that would automate the registration of the file types and icons, or via manual configuration.

Regards,

Marc
#
A non-text attachment was scrubbed...
Name: image2.png
Type: image/png
Size: 16336 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20101229/c66e8d52/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image2449.png
Type: image/png
Size: 20343 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20101229/c66e8d52/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: R.in.pkg.png
Type: image/png
Size: 32852 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20101229/c66e8d52/attachment-0002.png>
-------------- next part --------------
On Dec 29, 2010, at 3:54 PM, Marc Schwartz wrote:

            
These are all png files which Mark said might make it through although  
I thought only pdf or ps files would. No harm in trying.
David Winsemius, MD
West Hartford, CT
#
Hi Michael,

I've attached my attempt at an R-package logo.

Best,
 John

--------------------------------
John Fox
Senator William McMaster 
  Professor of Social Statistics
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
web: socserv.mcmaster.ca/jfox
On
http://cdn2.iconfinder.com/data/icons/DarkGlass_Reworked/128x128/apps/packag
e
http://www.R-project.org/posting-guide.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RPackage.png
Type: image/png
Size: 21192 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20101229/184d4b11/attachment.png>
#
I am trying to write a function that will access a column of a data frame without having to qualify the name of the data frame column as long as the name of the dataframe is passed to the function. As can be seen from the code below, my function is not working:

df <- data.frame(x=1:10,y=11:20)
df

test <- function(column,data) {
  print(data$column)
}

test(x,df)

 I am trying to model my function after the way that lm works where one needs not qualify column names, i.e.


fit1<- lm(y~x,data=df)


John David Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524
(Phone) 410-605-7119
(Fax) 410-605-7913 (Please call phone number above prior to faxing)

Confidentiality Statement:
This email message, including any attachments, is for th...{{dropped:6}}
#
On Dec 29, 2010, at 7:11 PM, John Sorkin wrote:

            
Not sure what the verb "qualify" means in programming. Quoting?
> df <- data.frame(x=1:10,y=11:20)
 > test <- function(column,dat) { print(colname <-  
deparse(substitute(column)))
+  dat[[colname]]
+ }
 >
 > test(x,df)
[1] "x"
  [1]  1  2  3  4  5  6  7  8  9 10
 >
#
?substitute

test <- function(col,frm) {
  eval(substitute(col),frm)
}

test2 <- function(col,frm){
  cname<- deparse(substitute(col))
  frm[[cname]]
}

 z <- data.frame(x=1:3,y=letters[1:3])

test(x, z)

test2(x, z)


-- Bert
On Wed, Dec 29, 2010 at 4:44 PM, David Winsemius <dwinsemius at comcast.net> wrote:

  
    
#
Thank you
John




John David Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524
(Phone) 410-605-7119
(Fax) 410-605-7913 (Please call phone number above prior to faxing)>>> Bert Gunter <gunter.berton at gene.com> 12/29/2010 8:17 PM >>>
?substitute

test <- function(col,frm) {
  eval(substitute(col),frm)
}

test2 <- function(col,frm){
  cname<- deparse(substitute(col))
  frm[[cname]]
}

 z <- data.frame(x=1:3,y=letters[1:3])

test(x, z)

test2(x, z)


-- Bert
On Wed, Dec 29, 2010 at 4:44 PM, David Winsemius <dwinsemius at comcast.net> wrote:

  
    
#
Thank you,
John




John David Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524
(Phone) 410-605-7119
(Fax) 410-605-7913 (Please call phone number above prior to faxing)>>> Bert Gunter <gunter.berton at gene.com> 12/29/2010 8:17 PM >>>
?substitute

test <- function(col,frm) {
  eval(substitute(col),frm)
}

test2 <- function(col,frm){
  cname<- deparse(substitute(col))
  frm[[cname]]
}

 z <- data.frame(x=1:3,y=letters[1:3])

test(x, z)

test2(x, z)


-- Bert
On Wed, Dec 29, 2010 at 4:44 PM, David Winsemius <dwinsemius at comcast.net> wrote:

  
    
#
Wow! thanks John, David and Marc
and Happy New Year to all R-helpRs

-Michael
On 12/29/2010 7:00 PM, John Fox wrote:

  
    
#
Here is an alternaive approach that is closer to that used by lm and friends.
[1]  1  2  3  4  5  6  7  8  9 10
[1] 11 12 13 14 15 16 17 18 19 20
There is a slight added bonus this way
[1] 13 15 17 19 21 23 25 27 29 31
(Well, I did say 'slight'.)

Bill Venables.
#
On Dec 30, 2010, at 01:44 , David Winsemius wrote:

            
To specify context, basically. 

I.e., the name "sex" may need to be qualified by the data frame in which the variable appears, as in mydata$sex. It can be used unqualified in model formulas, in with-constructs, or if the data frame was attached.

Google "qualified name" for further material.
#
On Dec 30, 2010, at 07:12 , <Bill.Venables at csiro.au> <Bill.Venables at csiro.au> wrote:

            
Now that's a rather interesting novel word you got there, Bill....
Yes, and similar stuff goes on in subset.data.frame(), with(), etc. However, there is a trend towards preferring to do non-standard evaluation in a more standard (less non-standard?) way, using formulas:
[1]  1  2  3  4  5  6  7  8  9 10
[1] 12 14 16 18 20 22 24 26 28 30

Or, you could pass expression(x) or quote(x) explicitly, but it's a bit more long-winded and you lose the ability to pass along the environment of the formula (and typically use enclos=parent.frame() instead).