myCompiler myCompiler
Deutsch English Español Français Italiano 日本語 한국어 Nederlands Polski Português
Recent
Login Sign up
Recent
Login Sign up
P

@ParfaitG

Subset Arc Coordinate Points

R
1 year ago
# BUILD DATA FRAME Radius <- 1 Horizontal_Coordinates <- seq(-Radius, Radius, 0.01) Positive_Vertical_Coordinates <- sqrt((Radius ^ 2) - (Horizontal_Coordinates ^ 2)) Negative_Vertical_Coordinates <- -sqrt((Radius ^ 2) - (Horizontal_Coordinates ^ 2)

Reformat Data with Coalesced Values

R
2 years ago
var_wide_df <- data.frame( Var1_E1_C1 = c(1, NA, NA, 1, 1), Var1_E1_C2 = c(NA, 3, 2, NA, NA), Var23_E2_C1 = c(NA,2 , NA, 1, 1), Var23_E2_C2 = c(3,NA , 1, NA, NA) ) var_long_df <- reshape( var_wide_df,

Random Walk Column Assignment

R
2 years ago
#Set a seed set.seed(2024) #Variable declaration------------- nConds <- 2 #Number of conditions stim <- c("R", "L") #Stimulus labels pi <- c(.75, .65) #Probability of step (+1) for random walk; 1-pi will be the probability of ste

Nested XML Minidom List/Dict Comprehension Parsing

Python
2 years ago
from pprint import pprint from xml.dom import minidom xml = '''\ <?xml version="1.0" encoding="UTF-8"?> <env:Envelope xmlns:env="http://schema.xmlsoap.org/soap/envelope/"> <env:Body> <wd:Get_Working_Response xmlns:wd="urn:com.workway/bsvc"

Unknown Column Subset Assignments

R
2 years ago
df <- data.frame(x=c(1, 2, NA, NA)) df$foo1[!is.na(df$x)] <- 777 df[["foo2"]][!is.na(df$x)] <- 888 `<-`(df$foo3[!is.na(df$x)], 999) `[[`(df, "foo4")[!is.na(df$x)] <- 0
Previous Next page

Supported languages

Deno JavaScript NodeJS Python Ruby Go C C++ Java C# TypeScript PHP Bash R Octave (MATLAB) Fortran Lua Erlang SQL MySQL MongoDB Clojure D Perl Kotlin Swift Rust Assembly
© 2026 mycompiler.io
Terms of service Privacy policy Contact us