Error in install.packages : ERROR: failed to lock directory ‘C:\Users\Soledad\Documents\R\win-library\3.6’ for modifying
Try removing ‘C:\Users\Soledad\Documents\R\win-library\3.6/00LOCK’
To solve this issue you just have to follow the recommendation in the error message
You just have to delete that file.
Also, I recommend you to not execute these lines of code since they make reference to folders that only exist in the author's computer and not in yours thus they are going to produce errors.
As a side note, please try to make your questions in English since it is the preferred language here and by using Spanish you are excluding most people from the conversation.
Hola Soledad, bienvenida!
Para resolver este problema, solo tienes que seguir las recomendaciones del mensaje de error.
Solo tienes que eliminar ese archivo.
Además, te recomiendo que no ejecute estas líneas de código, ya que hacen referencia a carpetas que solo existen en la computadora del autor y no en la suya, por lo que producirán errores.
Como nota al margen, intenta hacer sus preguntas en inglés, ya que es el idioma preferido aquí y al usar español excluyes a la mayoría de las personas de la conversación.