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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:10:05+00:00 2026-06-15T19:10:05+00:00

I went back to some R code that I wrote last month, but it

  • 0

I went back to some R code that I wrote last month, but it appears that the version of reshape (0.8.4, R 2.15.2) I am using has changed that functionality.

Here is a sample:

> library(reshape)
> so.test <- data.frame(
                       one = as.character(rnorm(750)),
                       two = as.character(rnorm(750)),
                       three = as.character(rnorm(750)), four = as.character(rnorm(750)))
> check <- melt(so.test)

Using one, two, three, four as id variables

This gives a data.frame equal to the original:

> table(so.test == check)

TRUE 
3000 

I have also tried this with reshape2::melt but I am getting the same result. Interestingly, the melt() function works as expected with a data.frame with numeric values:

> so.test2 <- data.frame(
                      one = rnorm(750),
                      two = rnorm(750),
                      three = rnorm(750), four = rnorm(750))
> check2 <- melt(so.test2)
Using  as id variables
> head(check2)
  variable      value
1      one  0.2471168
2      one -0.0663480
3      one -0.0251867
4      one  2.8786207
5      one -0.2586785
6      one -0.7508927
  • 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-15T19:10:07+00:00Added an answer on June 15, 2026 at 7:10 pm

    The documentation for both the reshape and the reshape2 version say:

    If you supply neither, melt will assume factor and character variables are id variables, and all others are measured.

    So melt is behaving as documented.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay. So I went on a trip, came back, and suddenly, a website that
I am trying to wrangle some demo code that runs as a console application
I have an FLA done in Flash 10, and some AS3 code that manipulates
I have some code I that although it works, its making my content erratic.
I have some parsing code that allows for escape sequences to be entered into
This is a Java syntax question, but just for some background. Using android, I
I'm using the prefab gallery in WordPress. For some inexplicable reason, the last few
I have VBA code that I wrote that creates an Excel Column Cluster chart
Here's the form that was formerly working. I just went back to it today
This is Delphi 2009, so Unicode applies. I had some code that was loading

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.