Suddelny, base solve function does not work on RStudio

Hello,
I am happy to join this community as a R & RStudio user.
Currently I am using the following R & RStudion tools respectively:
R version 3.2.5 (2016-04-14) -- "Very, Very Secure Dishes"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

** RStudio: Version 0.99.903 – © 2009-2016 RStudio, Inc.**

Today I have a very strange problem with "solve()" function while computing inverse of Hessian matrix as follows:

out.H0_NONEX_TVClayton.JPM_CRSP.optimHess
           [,1]       [,2]      [,3]       [,4]
[1,]  244.17575  335.66923  39.06532  2059.5617
[2,]  335.66923  493.16159  49.87913  2864.6609
[3,]   39.06532   49.87913   6.88191   322.6178
[4,] 2059.56169 2864.66086 322.61783 23293.0391

solve(out.H0_NONEX_TVClayton.JPM_CRSP.optimHess)
NULL

Suddenly, solve function does not work on my RStudion.

I check this situation even when I try to compute the following easy computations:

1+2
[1] 3
> sqrt(4)
[1] 2

solve(5,2)
NULL
solve(5,10)
NULL


Someone could help me about this strange situation? Maybe I should change into new Rstudio version?

Best regards,

1 Like

Have you tried new version of r studio and updated r version.

1 Like

Hi! Welcome to Rstudio Community!

It looks like your code was not formatted correctly to make it easy to read for people trying to help you. Formatting code allows for people to more easily identify where issues may be occuring, and makes it easier to read, in general. I have edited you post to format the code properly.

In the future please put code that is inline (such as a function name, like mutate or filter) inside of backticks (`mutate`) and chunks of code (this includes error messages and code copied from the console) can be put between sets of three backticks:

```
example <- foo %>%
  filter(a == 1)
```

This process can be done automatically by highlighting your code, either inline or in a chunk, and clicking the </> button on the toolbar of the reply window!

This will help keep our community tidy and help you get the help you are looking for!

For more information, please take a look at the community's FAQ on formating code

3 Likes

My guess is you have some package loaded that is overriding the definition of solve(). Please try typing print(solve) in the console and see what you get. You should get something like below. If you don't then perhaps a restart of the session may clear the issue (though that is assuming you don't have anything in the session that isn't easy to re-build).

> print(solve)
function (a, b, ...) 
UseMethod("solve")
<bytecode: 0x10b1f1a70>
<environment: namespace:base>
1 Like