Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8566551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:40:48+00:00 2026-06-11T17:40:48+00:00

I am trying to plot Banknote data frame from alr3 package.My pairs function throws

  • 0

I am trying to plot Banknote data frame from alr3 package.My pairs function throws me error and doesn’t give me correct plot when I execute it.Can someone tell me what’s going wrong here? Thanks.

Basically I am trying to write code to find out all the counterfeit banknotess from “banknote” data frame present in “alr3” package.

Code:-

pairs(banknote[,-1],panel=
function(x,y,fake){
xy <- cbind(x,y)
points(xy[fake==0,],pch=15)
points(xy[fake==1,],pch=0)
}, fake=Y)

Errors:-

Error in points(xy[fake == 0, ], pch = 15) : 
  (subscript) logical subscript too long
In addition: Warning messages:
1: In plot.window(...) : "fake" is not a graphical parameter
2: In plot.xy(xy, type, ...) : "fake" is not a graphical parameter
3: In title(...) : "fake" is not a graphical parameter
4: In plot.window(...) : "fake" is not a graphical parameter
5: In plot.xy(xy, type, ...) : "fake" is not a graphical parameter
6: In title(...) : "fake" is not a graphical parameter
7: In axis(side = side, at = at, labels = labels, ...) :
  "fake" is not a graphical parameter
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T17:40:49+00:00Added an answer on June 11, 2026 at 5:40 pm

    Echoing @DWin, it is not clear what Y is, given that it will try and get Y from your workspace.

    If you mean to set the pch by the column Y within banknote, then the following will work

    pairs(banknote[,-c(1,7)], 
      panel = function(x,y,...){
        points(x,y,pch = ifelse(as.logical(banknote$Y), 0,15))})
    

    enter image description here

    If you don’t want to have to reference the data.frame and column using $ then you could wrap everything within a with(banknote, ...) statement, then R will look within banknote to find the variables first

    So the following will work

    with(banknote, pairs(list(Left = Left, Right = Right, Bottom = Bottom, 
            Top = Top, Diagonal = Diagonal), 
          panel = function(x,y) points(x,y, pch= ifelse(as.logical(Y),0,15))) 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to plot some data using pylab scatter function. I'm using pylab.scatter(X,
I am trying to plot side by side the following datasets dataset1=data.frame(obs=runif(20,min=1,max=10)) dataset2=data.frame(obs=runif(20,min=1,max=20)) dataset3=data.frame(obs=runif(20,min=5,max=10))
Trying to plot a ConvexHull Using PlanarGraphPlot from the ComputationalGeometry package, it does not
I'm having some problems trying to plot two different data sets from stdin in
When trying to plot my data I get these error messages: 1: In min(x)
I am trying to plot some data from Flexible Image Transport System (FITS) files,
I am trying to plot hourly meteorological data coming from a meteorological station with
I am trying plot data sets consisting of 3 coordinates: X-coordinate, x-coordinate and the
I'm trying to plot values as a function of the date (only hh:mm:ss, without
I am trying to plot this kind of behaviour of a data set. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.