domingo, 13 de dezembro de 2020

Renaming invalid variables on Stata

After exporting an R database to Stata, the variables were like below, with "." in their names. 


Trying to rename them, resulted on the error: 
You used . in oldname, not newname. . is used in newname to indicate that the corresponding wildcard in oldname be skipped. E.g., "rename a*b* a.b*" removes what is between a and b; variable ausbvalue would be renamed abvalue. 

After searching for a solution, i found one here To rename the variables to a valid name you can just use the code below to fix the var names.

forvalues i = 1/`c(k)' {

    qui mata: st_isname(st_varname(`i')) ? 1 : st_varrename(`i', ustrtoname(st_varname(`i'))) 

}





segunda-feira, 18 de maio de 2020

Video playback slow and lagging on Linux (Solus OS)

After installing solus and trying to playback some 720p and 1080p videos i noticed that the videos were lagging and stuttering really badly in vlc, gnome mpv and other players. Doing some research i didn't found the exactly answer but i found  that running vlc on terminal might show the problem. Reading the errors i saw that there was a libva error showing up and looking for "libva" on Solus software center i found that libva-intel-driver was missing, so i installed it and also libva-32bit library just in case.


And sure enough, the videos are now running smoothly.


So, to solve this problem you can try installing the libva library specific to your system, it worked for me.