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 8903887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:58:59+00:00 2026-06-15T01:58:59+00:00

I have number of tables which contain temperature variable. Moreover I have a table

  • 0

I have number of tables which contain temperature variable.
Moreover I have a table which contain coordinates.
I want to assign a specific row of the coordinate table to the temperature tables. In other words as a result a new column will be created in each temperature table which contains a row of the coordinate table. Moreover, based on id of the coordinate table corresponding values of the table should be added to the relevant temperature table with respect to the table name.

Table1:Tab2:Tab3: Tab4:                       
-0.52|-0.93|-0.23|-0.32                           
-0.56|-0.33|-0.13|-0.37
-0.54|-0.13|-0.33|-0.64
-0.5 |-0.93|-0.53|-0.63
-0.54|-0.83|-0.63|-0.43
-0.56|-0.53|-0.38|-0.34
-0.62|-0.03|-0.13|-0.33

Coordinate:
id       E              N       
2     2579408.2431  1079721.1499
3     2579333.7158  1079729.1852
4     2579263.6502  1079770.1125
5     2579928.0358  1080028.4605
6     2579763.6471  1079868.9218
7     2579698.0756  1079767.9762
8     2579543.1019  1079640.6512

Results:
Table2:
Temperature  coordinate 
-0.52        2579408.2431  1079721.1499                    
-0.56        2579408.2431  1079721.1499   
-0.54        2579408.2431  1079721.1499
-0.5         2579408.2431  1079721.1499
-0.54        2579408.2431  1079721.1499
-0.56        2579408.2431  1079721.1499
-0.62        2579408.2431  1079721.1499
  • 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-15T01:59:00+00:00Added an answer on June 15, 2026 at 1:59 am
    dat <- read.table(text="Table1|Table2|Table3|Table4
    -0.52|-0.93|-0.23|-0.32
    -0.56|-0.33|-0.13|-0.37
    -0.54|-0.13|-0.33|-0.64
    -0.5 |-0.93|-0.53|-0.63
    -0.54|-0.83|-0.63|-0.43
    -0.56|-0.53|-0.38|-0.34
    -0.62|-0.03|-0.13|-0.33", sep="|", header=T)
    
    coord <- read.table(text="id       E              N       
    2     2579408.2431  1079721.1499
    3     2579333.7158  1079729.1852
    4     2579263.6502  1079770.1125
    5     2579928.0358  1080028.4605
    6     2579763.6471  1079868.9218
    7     2579698.0756  1079767.9762
    8     2579543.1019  1079640.6512", header=T)
    

    First, let’s turn the column names into digits:

    > names(dat) <- gsub("[^[:digit:]]", "", names(dat))
    

    Then stack the data and change the names:

    > stacked <- stack(dat)
    > names(stacked) <- c("Temperature, id")
    

    Finally, we merge the data:

    > merge(stacked, coord)
       id Temperature       E       N
    1   2       -0.93 2579408 1079721
    2   2       -0.33 2579408 1079721
    3   2       -0.13 2579408 1079721
    4   2       -0.93 2579408 1079721
    5   2       -0.83 2579408 1079721
    6   2       -0.53 2579408 1079721
    7   2       -0.03 2579408 1079721
    8   3       -0.23 2579334 1079729
    9   3       -0.13 2579334 1079729
    10  3       -0.33 2579334 1079729
    11  3       -0.53 2579334 1079729
    12  3       -0.63 2579334 1079729
    13  3       -0.38 2579334 1079729
    14  3       -0.13 2579334 1079729
    15  4       -0.32 2579264 1079770
    16  4       -0.37 2579264 1079770
    17  4       -0.64 2579264 1079770
    18  4       -0.63 2579264 1079770
    19  4       -0.43 2579264 1079770
    20  4       -0.34 2579264 1079770
    21  4       -0.33 2579264 1079770
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one table TABLE_SUBJECT which contain a number of subjects. I need to
I have project which contain 4 tables among these shedule table Session column i
I have two tables in a database. Table 1 includes an order number which
I have a number of tables, which have nested tables. I using jQuery to
I have some indexes in a table which name is a number(1,2,3,4...) But when
I have a number of static classes that contain tables like this: using System;
I have two tables that contain data from different temperature sensors: Table1 _TimeStamp Temperature
I have 3 tables which contain different types of data related to each other.
I have one voter table which contain large amount of data. Like Voter_id name
I have an mdb which used to contain a bunch of linked tables. These

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.