Menu
  • HOME
  • TAGS

Splitting a dataframe based in a column

r,loops,split,chr

First split your data.frame. df.split <-split(df,df$Chr)# where df is your original dataframe #and we split on Chr Now, write it out to separate tab-separated files lapply(names(df.split),function(x) write.table(file = paste0("df",x,".txt"), df.split[[x]], sep = "\t")) ...

In VBA, find n such that Chr(n) is greater than or equal to

vba,ascii,chr

The character value code for greater than or equal is reached with ChrW, which accesses the Unicode character set, and the value is ChrW(&H2265)

display ASCII data in ColdFusion from a parameter

coldfusion,ascii,chr

You need to have this in the top of your 'language file', and whatever .cfm file you're including it in: <cfprocessingdirective pageencoding="utf-8" /> See: https://wikidocs.adobe.com/wiki/display/coldfusionen/cfprocessingdirective ...

ORD and CHR a file in Bash

bash,chr,ord

Your ord function is really weird. Maybe it would be better to write it as: function ord { printf -v ordr "%d" "'$1" } Then you would use it as: TEXT=$(cat "$1") for (( i=0; i<${#TEXT}; i++ )); do ord "${TEXT:$i:1}" printf '%s\n' "$ordr" done This still leaves two problems:...

Split a dataframe and subset and plot it with loop

r,loops,plot,subset,chr

Unless you really want to, it's a bad idea to create all these new varaibles based on the elements in input$name because: if the input$name contains a name such as 'input' that clashes with another variable you can get bugs that are hard to track down You potentially clutter up...

Caesar Cipher in Python 3.4.3

python,chr,caesar-cipher,ord

The issue is that you are setting conversion inside your for loop, instead of appending to it, so only the last character in the word is appended to the newPhrase at the end. You should be appending to conversion, rather than setting it. Also, you should initialize newPhrase outside the...