You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In your Matlab environment, use the following command:
Rclear
Rinit([],'/usr/bin/R'); %your path to R.exe (type which R for linux user, where R for windows)
Rinit('gmwmx')
filepath = 'filepathwiththedatatoanalyse'
Rpush('filepath',filepath)
Rrun('data_dobs <- read.gnssts(filename = filepath)')
Rrun('fit <- estimate_gmwmx(x = data_dobs, theta_0 = c(0.01,0.1,1.3),model_string = "matern", n_seasonal=0)')
Then extract only the information you are interested in, for instance:
Rrun('beta <- fit$beta_hat')
Rrun('theta <- fit$theta_hat')
and finally:
[beta,theta] = Rpull('beta','theta');
You have now beta and theta in your Matlab environment. For further information and example: https://github.com/kreutz-lab/Rcall/wiki
Rcall can be used in any Matlab script. Using Rcall involves passing all necessary data to R, performing computations according to the user input, and sending the results back to Matlab for further use.
The text was updated successfully, but these errors were encountered:
You are working with Matlab and want to link your workspace with gmwmx?
Here is the procedure to follow:
Rclear
Rinit([],'/usr/bin/R'); %your path to R.exe (type which R for linux user, where R for windows)
Rinit('gmwmx')
filepath = 'filepathwiththedatatoanalyse'
Rpush('filepath',filepath)
Rrun('data_dobs <- read.gnssts(filename = filepath)')
Rrun('fit <- estimate_gmwmx(x = data_dobs, theta_0 = c(0.01,0.1,1.3),model_string = "matern", n_seasonal=0)')
Then extract only the information you are interested in, for instance:
Rrun('beta <- fit$beta_hat')
Rrun('theta <- fit$theta_hat')
and finally:
[beta,theta] = Rpull('beta','theta');
You have now beta and theta in your Matlab environment. For further information and example: https://github.com/kreutz-lab/Rcall/wiki
Rcall can be used in any Matlab script. Using Rcall involves passing all necessary data to R, performing computations according to the user input, and sending the results back to Matlab for further use.
The text was updated successfully, but these errors were encountered: