Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

mt_import_long issues reading column names

I'm having issues with the mt_import_long function. It produces an error message when I try to import a csv file created by matlab.

"Warning message: In mt_import_long(data, xpos_label = "XPos", ypos_label = "YPos", : After removing trajectory data, more than one unique row per mt_id remains."

I believe the issue is related to reading my column names for the mt_seq_label. When I open the csv file in excel, delete the column name, manually retype it, and rerun the r script, it works. I have no clue why this happens or why it works after I open and retype the column name in excel. I've tried renaming columns in R before using the mt_import_long function and it still produces the error message. The function only works after I open the data files in excel and retype the column name.


Thanks,

Carrie

Comments

  • Hi Carrie,

    without seeing the data I can only guess, but one issue that sometimes occurs when you read csv files into R is that the column names are misplaced, i.e., shifted by one column (which can e.g. happen if the csv contains row numbers which are ignored during data import). Did you take a closer look at the data data.frame after you read the data into R to see whether all data are in the correct columns and whether there are no additional columns that you would not expect to see there?

    Best,

    Pascal

  • Thanks for the quick reply! I have checked and the column names are in the correct position.

    Carrie

  • Hi Carrie,

    that's good, then a shifted column order does not seem to cause the issue.

    I think you would have to provide me with some additional information so I can help you further. Specifically, could you post the code you use to read in the data into R and the complete command when you run mt_import_long? And could you share a few example rows of your dataset that you pass on to mt_import_long?

    Best,

    Pascal

  • Here are screenshots. Thank you.

    Code to read and mt_import_long

    data imported into R


  • Hi Carrie,

    sorry for the delayed reply, I was on vacation.

    Thanks for sharing the screenshots. In principle everyhing looks fine to me. However, depending on whether you have data from one or several subjects in your data data.frame, you could change mt_id_label = "Trial" to mt_id_label = c("SubjectID", "Trial") to ensure that unique trials are identified. In addition, I don't know if the values in the Time, StartTime and EndTime columns are constant within a trial - if they are are not, it would be good to remove these columns before calling mt_import_long.

    Best,

    Pascal

  • Just to clarify (as background information):

    The warning message above ("Warning message: In mt_import_long(data, xpos_label = "XPos", ypos_label = "YPos", : After removing trajectory data, more than one unique row per mt_id remains.") is outputted by mt_import_long when any other column in your dataset that was not specified as xpos/ypos/timestamps_label varies within the trial.

    So in case there are any additional variables that vary within the trial, you could either specify them via the add_labels argument or exclude them before calling mt_import_long.

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games