Re: [R] Error with RMySQL

2021-10-28 Thread Ashim Kapoor
Dear Jim, > That error means that your user number or group is not allowed to > access it. Did you create the new one as a different user, maybe as > root? Here is what I did: I switched to root in the MySQL Server, created a new user called user2. I GRANTed user2 all permissions to access db2.

[R] Need help to print matrix with element and position

2021-10-28 Thread Anas Jamshed
I create a matrix of size 3x3 called mat_1 and then I want to iterate over all the values one by one and print the element as well as the position in the matrix: My code is : mat_1= matrix( c('1','2','3','4','5','6','7','8','9'), nrow = 3, ncol = 3,byrow = TRUE) mat_1 # Loop over my_matrix

Re: [R] Error with RMySQL

2021-10-28 Thread Ashim Kapoor
Dear Jim, Can you please help me? I am a little confused here. Best, Ashim On Thu, Oct 28, 2021 at 11:30 AM Ashim Kapoor wrote: > > Dear Jim, > > > That error means that your user number or group is not allowed to > > access it. Did you create the new one as a different user, maybe as > >

Re: [R] Error with RMySQL

2021-10-28 Thread Jim Lemon
Hi Ashim, I was out for a while. I would first try to restart MySQL, then if that didn't fix it, try logging in as root and accessing the database. While I can't debug this at a distance, I'm pretty sure that the database thinks that you aren't authorized to access it. If the restart works, your

Re: [R] Need help to print matrix with element and position

2021-10-28 Thread Jim Lemon
mat_1= matrix( c('1','2','3','4','5','6','7','8','9'), nrow = 3, ncol = 3,byrow = TRUE) mat_1 # Loop over my_matrix for(row in 1:nrow(mat_1)) { for(col in 1:ncol(mat_1)) { cat(row,col,mat_1[row,col],"\n") } } On Thu, Oct 28, 2021 at 8:01 PM Anas Jamshed wrote: > > where should I

Re: [R] Error with RMySQL

2021-10-28 Thread Ashim Kapoor
Dear Jim, Many thanks. I will try your suggestion and come back to you. Many thanks, Ashim On Thu, Oct 28, 2021 at 1:25 PM Jim Lemon wrote: > > Hi Ashim, > I was out for a while. I would first try to restart MySQL, then if > that didn't fix it, try logging in as root and accessing the

Re: [R] Need help to print matrix with element and position

2021-10-28 Thread Anas Jamshed
where should I place cat(row,col,mat_1[row,col],"\n")? On Thu, Oct 28, 2021 at 1:58 PM Jim Lemon wrote: > Hi Anas, > How about: > > cat(row,col,mat_1[row,col],"\n") > > Jim > > On Thu, Oct 28, 2021 at 7:19 PM Anas Jamshed > wrote: > > > > I create a matrix of size 3x3 called mat_1 and then I

Re: [R] Need help to print matrix with element and position

2021-10-28 Thread Rui Barradas
Hello, With no loops: cbind( row = c(t(row(mat_1))), col = c(t(col(mat_1))), mat_1 = as.numeric(t(mat_1)) ) If the matrix entries are not numeric, use cbind.data.frame. This will keep the row and column numbers as numbers, the default cbind method would coerce them to the class of

Re: [R] Error with RMySQL

2021-10-28 Thread Ashim Kapoor
Dear Jim, I restarted the mariadb.service but I am STILL not able to access the server. I can access one database from one user but not from another user. The credentials seem to be OK to me. If I can figure this out I will post it here. Many thanks, Ashim On Thu, Oct 28, 2021 at 1:38 PM

Re: [R] Need help to print matrix with element and position

2021-10-28 Thread Jim Lemon
Hi Anas, How about: cat(row,col,mat_1[row,col],"\n") Jim On Thu, Oct 28, 2021 at 7:19 PM Anas Jamshed wrote: > > I create a matrix of size 3x3 called mat_1 and then I want to iterate over > all the values one by one and print the element as well as the position in > the matrix: > > My code is

Re: [R] R vs Numpy

2021-10-28 Thread Sorkin, John
Catherine, R is a program that is designed for the statistical analysis and visual display of data. Advantages and disadvantages depend on what you want to do with the language. John From: R-help on behalf of Catherine Walt Sent: Thursday, October

Re: [R] R code in RData

2021-10-28 Thread Martin Maechler
> Bert Gunter > on Wed, 27 Oct 2021 10:47:14 -0700 writes: > See ?load, but you may be confused. Strictly speaking, there is no code in > an .Rdata file, only a (typically binary, but possibly ascii) > representation of objects, usually as produced by ?save. Of course,

Re: [R] Error: the leading minor of order 6 is not positive definite

2021-10-28 Thread John Kane
I think we need the code you are running, any error messages you are getting and some sample data. A handy way to supply sample data is to use the dput() function. See ?dput. If you have a very large data set then something like head(dput(myfile), 100) will likely supply enough data for us to

[R] R vs Numpy

2021-10-28 Thread Catherine Walt
Hello members, I am familiar with python's Numpy. Now I am looking into R language. What is the main difference between these two languages? including advantages or disadvantages. Thanks. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and

Re: [R] Error with RMySQL

2021-10-28 Thread Ken Peng
It seems like mysql server doesn't open the right authentication for your access, such as user or host permissions. Thanks. On Thu, Oct 28, 2021 at 1:42 PM Ashim Kapoor wrote: > Dear R - users, > > I have 2 databases on a MySQL server. I am able to access the old one > but not the freshly

Re: [R] R code in RData

2021-10-28 Thread Martin Maechler
> Jeff Newmiller > on Wed, 27 Oct 2021 11:43:08 -0700 writes: > Sounds right, though the OP appears to be assuming that the code used to generate the data objects in the file will also be there, and we need to be more definitive about that: it is not. Depending how the code was

Re: [R] R vs Numpy

2021-10-28 Thread J C Nash
https://www.ibm.com/cloud/blog/python-vs-r On 2021-10-28 2:57 a.m., Catherine Walt wrote: Hello members, I am familiar with python's Numpy. Now I am looking into R language. What is the main difference between these two languages? including advantages or disadvantages. Thanks.

Re: [R] R vs Numpy

2021-10-28 Thread Avi Gross via R-help
I am not sure your overall question fits into this forum but a brief internet search can find plenty of info. But in brief, R is a language in which much of what numpy does was built in from the start and many things are vectorized. Much of what the python pandas language does is also part of

Re: [R] R vs Numpy

2021-10-28 Thread Enrico Schumann
On Thu, 28 Oct 2021, Catherine Walt writes: > Hello members, > > I am familiar with python's Numpy. > Now I am looking into R language. > What is the main difference between these two languages? including advantages > or disadvantages. > > Thanks. > Perhaps also of interest:

Re: [R] R vs Numpy

2021-10-28 Thread Jeff Newmiller
This is dangerously close to off topic, or at least it could be fuel for divisive argument rather than informed discussion (most readers here might be short on details of NumPy and long on details regarding R). Have you used a search engine? Google found