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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:41:31+00:00 2026-06-15T20:41:31+00:00

I have a dataset called J_BL5H1, this includes : Var1 Freq 4 10 8

  • 0

I have a dataset called “J_BL5H1”, this includes :

Var1    Freq
4   10
8   10
10  13
11  7
13  3
17  10
19  10
25  1
26  4
27  8
53  13

From this dataset, I want to find all Var1s seperately, and I want to called this new data like J_BL5H1JNVar1Number, here Var1Number denotes to specific Var1s, e.g. “4, 8, 10”.

I will use this :

J_BL5H1JNVar1Number <- J_BL5H1$Freq[1]

Here, I want to replace Var1Number to “Var1” values in the old data.

For example, if I want to know the “Freq[4]”, my new data should be called like “J_BL5H1JN11”, the “Var1Number” will be automatically replaced by the Var1 of Freq[4], in this case by 11.

I hope I can clearly state my problem, Thanks.

  • 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-15T20:41:32+00:00Added an answer on June 15, 2026 at 8:41 pm

    First use paste to create the names of the data.sets:

     data.string <- "J_BL5H1LN"
     split.var <- "Var1"
     data.sets <- paste(data.string, J_BL5H1[, split.var], sep = "")
    

    Then use a loop to assign the according values to the data sets:

     for( i in seq_along(data.sets) ) assign(data.sets[i], J_BL5H1[i, "Freq"])
    

    Now you have the data sets in your workspace:

    ls()
    

    Btw, if you want to access the different data sets without actually calling them every time, you can access them by name using the get function:

    sapply(data.sets, get)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have a dataset called data that was created from dataset(xls2struct('file.xls') : subj_CDI:
Afternoon all, I have a dataset with a variable called list_name. Some of these
I have a comma seperated dataset called Book2.csv I want to extract the contents.
I have 2 extracted data sets from a dataset called babies2009( 3 vectors count,
I have a a dataset under a folder called DataSetsForReporting, this xsd is called:
Greetings, I'm working in windows application using C#. I have typed-dataset called packetsDBDataSet and
I have a Sql Server reporting services project. I have a dataset query called
I have 2 datatables in a dataset. One table has a list called CostTypes.
I have a dataset with one datatable. Now I want to set a filter
I'm using a dataset. I have a table Adapter called PackageTableAdapter , which contains

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.