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

  • Home
  • SEARCH
  • 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 8493473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:01:13+00:00 2026-06-10T23:01:13+00:00

I’m trying to obtain a surface plot from data frame AAA : j a

  • 0

I’m trying to obtain a surface plot from data frame AAA:

j     a           m  p       o            f
13929 0.86739583  19 165.83  0.1588727    13.24444
13930 0.63166667  19 178.19  0.6105804    12.68333
13932 0.90212963  17 157.77  0.3345627    12.52222
13933 0.80152778  68 146.19  0.1219885    12.35000
13934 0.75784722  62 134.88  0.1531627    12.36667
13935 0.57763889  66 123.80  0.4093869    12.47500
13936 0.56201389  88 112.87  0.9095722    12.45833
13937 0.51680556  26 102.03  0.8494420    12.37500
13938 0.46093333  28  91.20  0.9153419    12.21111
13939 0.16645833  24  80.30  0.8309784    12.04444
13940 0.15451389  36  69.23  2.2847927    12.15556
13941 0.51347222 134  57.92  2.9551087    12.42500
13942 0.33763889 128  46.31  3.5784096    12.53333
13943 0.12937500  38  34.33  3.7371723    12.47778
13944 0.42760870  63  22.00  4.7831677    12.46667
13945 0.09962121   8   9.36  4.8281897    12.30000
13950 0.97901515  18  57.70  0.0000000    12.15833
13951 0.85333333  14  71.07  0.0000000    12.48333
13952 0.92811594  14  84.28 10.0444672    12.49167
13953 0.84812500  42  97.29  7.8020987    12.51667

My code:

require(fields)
fitx <- Tps( AAA[, 4:6], AAA$a)
out.p <- predict.surface(fitx, xy = c(4,5))
plot.surface(out.p, type="p")

However, it doesn’t run through. Apparently, the grid is insufficient to represent the data and it’s not able to get the predict.surface.

  • 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-10T23:01:15+00:00Added an answer on June 10, 2026 at 11:01 pm

    In the Tps function, your x matrix is AAA[, 4:6] and hence has three columns.

    But in the predict.surface function, you specified xy = c(4,5). The values passed to the xyparamter are relative to the matrix in your fitx object. Since the matrix used for creating fitx with the predict.surface function has three columns, you can’t refer to the 4th and 5th column. Instead, the columns 4 and 5 of your original data.frame AAA correspond to columns 1 and 2 in fitx.

    You might wish to try:

    library(fields)
    fitx <- Tps(AAA[, 4:6], AAA$a)
    out.p <- predict.surface(fitx, xy = c(1,2)) # Note the different argument passed to `xy`
    plot.surface(out.p, type="p")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I want to construct a data frame in an Rcpp function, but when I
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to select an H1 element which is the second-child in its group
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string

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.