Questions tagged [levels]

491 questions
-1
votes
2 answers

Number of files and directories in linux directory, only in level 2

The instruction $ ls | wc -l gives us the number of directories and files that are in a certain directory without counting those that exist within the subdirectories of this first level, that is, it gives us the number in a non-recursive way. How…
epicteto
  • 11
  • 4
-1
votes
1 answer

R ggplot2 Visualize categorical variable that levels appear more than once

I am trying to visualize some tennis data with ggplot2 in R. Here are my data: Year<-c(1999:2020) Player <- rep("Federer",22) Rank <- c("Q1","3R","3R","4R","4R","W","SF","W","W","SF","F","W","SF","SF","SF","SF","3R", …
k.atli
  • 33
  • 1
  • 6
-1
votes
2 answers

Program won't loop or add to a list

I have made (or more, I'm trying to make) a program to help me calculate some figures. I have some levels that each give a reward and to give out the rewards I prefer to not insert each amount and add them all up to get the totals. I've made it so…
Mottysc
  • 31
  • 7
-1
votes
1 answer

change levels of column names of a matrix for plotting heatmap

I have my matrix and I'm ready to plot a heatmap using the pheatmap package in R. My matrix is like: Name A B C Apple 1 2 3 Banana 4 5 6 Pear 7 8 9 If I don't cluster the column, the heatmap will order the columns as A, B and C. What if I want to…
Lennon Lee
  • 194
  • 1
  • 14
-1
votes
2 answers

BASIC - R Data type issue; type integer and contains many 'levels'?

I am new to the beautiful language of R and currently I am having difficulties understanding the following: I am loading in a CSV file. This CSV file contains two columns. The first column is a unique ID. The second column is named 'content'. The…
nielsvg
  • 25
  • 6
-1
votes
2 answers

Converting counts of levels to separate variables, including 0s for missing counts

I have a dataframe (table), that includes frequency counts (Freq) of 2 levels (F, I) of a categorical variable (Fert). table[1:10] FemID Sperm Week Fert Freq 1: 269 High 1 F 4 2: 269 High 1 I 5 3: 273 High 1 F…
-1
votes
1 answer

How can I merge a df in R with category values with another df with its corresponding values?

EDIT: Rephrasing: The situation described can be the result of data extraction from different statistical programs, that may produce separately csv files with (a) factors levels and (b) their corresponding assigned "numerical" values. 1) I may…
Estatistics
  • 874
  • 9
  • 24
-1
votes
1 answer

Make heatmap of presence of levels for a dataframe

I have a dataframe containing biological observations. For each observations, i have latitude, longitude and species name. What i want to do is an heatmap of the biodiversity/species richness (number of different species at a location). I don't want…
Bast_B
  • 143
  • 6
-1
votes
1 answer

Error when replacing new factor levels in test dataset with `NA`

I have split my data set into testing and training data sets. I've tried to fit a regression on the training set, and then use predict on the testing set. When I do this I get an error message that says: "Error in model.frame factor x has New…
grig109
  • 73
  • 1
  • 9
-1
votes
1 answer

Make column levels into new columns R

I have a data table[1000+, 4]. One of the columns has 5 levels and I want to make these 5 levels into 5 new columns. Any suggestions?
R.D.
  • 11
  • 6
-1
votes
1 answer

How to create a table that indicates existence of factor levels in several data.frames

I have several data.frames that have some common factor variables. However, missing observations cause discrepancies and some levels go missing in some of the data.frames. I would like to create a summary table that indicates which data.frames…
Antti
  • 1,263
  • 2
  • 16
  • 28
-1
votes
1 answer

how to show the score in your game?

I am making a game like logo quiz but I haven't been able to make the player gain score after he answers correctly. Here is what I have until know: public class Capitolio extends Activity { @Override protected void onCreate(Bundle…
user3186708
  • 3
  • 1
  • 4
-1
votes
1 answer

R reading in data from a column but it isn't pure data, it has a "levels" separator

I have a pretty standard table, usually when I do something like this to read in a column from the table it works fine, but for some reason this time it didn't. x <- dataFile$columnName Here is what I get: [1] 61 71 83 55 44 78 57 46 41 36 45 48 38…
user2963379
  • 155
  • 1
  • 12
-1
votes
1 answer

Tower Defense unlimited levels

I found a website, http://www.flashgametuts.com/tutorials/as3/how-to-create-a-tower-defense-game-in-as3-part-1/, that gave me a basic tutorial on how to create a Tower Defense game in action script 3.0 and the way that it said to put the creation…
-2
votes
1 answer

lvl system for discord python sql3

The level system does not work @bot.event async def on_message(message): user = message.author.id conn = sqlite3.connect('server.db') cur = conn.cursor() cur.execute('SELECT xp, lvl FROM users WHERE id = ?') …
Gay FACE
  • 3
  • 1
1 2 3
32
33