While an R function is running, it shows no > prompt in the console pane until it is finished. Unless dealing with large data it is rare for a function to make very many seconds. For example,
I see the > instantly after i hit enter for the call of the Surv function. but i did not get any output file. Does this mean this function does not produce any output file?
To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one:
I tried to produce a sample dataset but i got errors.
I was wondering if you can tell i should get an output or an output file if i run the below command (i have successfully created the data frame and those two variables are in the dataset)
S <- (Surv(data$Time_fup, data$outc_diab)
There is now a new function psm() from a different package, {rms} working with data that can only be guessed out and it's still not apparent whether or not S is working yet. The problem may be as the package author explained:
I tried the Surv function again. If I do not assign the function call to S I can see the output. But it is odd that the assignment does not work. I am using the IT built Rstudio through Xterm and it was not the regular Rstudio server.
Can you tell if the way that I access to Rstudio may lead to the errors I got or anything wrong?
No. I do not have evidence it does not work. But my understanding is if it works it should output to the console.
Yes. Not working for me means not printing out. I do see S in the environment pane. But it only shows the file size and attributes information. I need to see the output that I got for not performing the assignment.
Please point out if I have missed important information or if I have misunderstood anything.
If a function returns an object with a print method (most do, including Surv()), then simply typing the object S at a prompt in the console will provide a display. On the other hand, most functions simply discard objects they complete and you have to expressly assign it from outside the function.
As far as the RStudio installation, I always assume that if an IT department doesn't use software for its own internal purposes, it's not always installed and maintained with care unless someone very senior in the organization is asking.
There's an alternative, assuming that IT hasn't also locked down interactive websites: Posit Cloud, which provides a web interface to the RStudio GUI that is almost identical to what you experience on the desktop.