Re: [R] Pixel Image Reshaping using R

2022-02-24 Thread Ivan Krylov
On Thu, 24 Feb 2022 11:00:08 -0500 Paul Bernal wrote: > Each pixel column in the training set has a name like pixel x, where > x is an integer between 0 and 783, inclusive. To locate this pixel on > the image, suppose that we have decomposed x as x = i ∗ 28 + j, where > i and j are integers

Re: [R] Pixel Image Reshaping using R

2022-02-24 Thread Ivan Krylov
On Thu, 24 Feb 2022 13:31:09 -0500 Paul Bernal wrote: > Basically, what I am being asked to do is to take the > train.csv dataset, and store it in a data structure so that the data > can be reshaped into a matrix of size 28 x 28, then I just need to > print some indices of that (e.g. index 1, 2,

Re: [R] Pixel Image Reshaping using R

2022-02-24 Thread Sarah Goslee
Hi Paul, I may be missing something, but you can transform a vector to a matrix of any desired size by using matrix(). For more nuanced processing of images, you might look into one of the many image processing packages in R, or even the raster package (or the newer terra). Sarah On Thu, Feb

Re: [R] Pixel Image Reshaping using R

2022-02-24 Thread Paul Bernal
Dear Ivan, this is what I did: dataframe_train <- as.matrix((read.csv(file_path_2, header=TRUE, stringsAsFactors = FALSE))) dim(dataframe_train) <- c(28,28) The file I read was the one I attached in the first email. Would this do the work to reshape original dataset into a 28 x 28 matrix? When I

Re: [R] Pixel Image Reshaping using R

2022-02-24 Thread Paul Bernal
Thank you Ivan. Basically, what I am being asked to do is to take the train.csv dataset, and store it in a data structure so that the data can be reshaped into a matrix of size 28 x 28, then I just need to print some indices of that (e.g. index 1, 2, 4, 7,, etc.) I basically tried the following:

[R] R WORDLE tool concepts vary

2022-02-24 Thread Avi Gross via R-help
This forum often discusses different ways of looking at a problem that result in often very different R formulations. Many may be RIGHT in a sense but some clearly have tradeoffs or work only in limited circumstances or come from some limited way of thinking. Note this message got to be a bit

Re: [R] installation problem for a new package

2022-02-24 Thread Jeff Newmiller
These messages seem relevant: >Error: package �CVXR’ could not be loaded >Warning messages: >1: In i.p(...) : installation of package �gmp’ had non-zero exit status You need to make sure these packages are installed successfully before the package you are interested will install. Please don't

Re: [R] installation problem for a new package

2022-02-24 Thread Jeff Newmiller
Do use "reply-all"... others may be able to respond more quickly or more accurately than I. I have re-introduced the mailing list to this reply. For example, if you read [1] it says there is a system requirement that the completely separate gmp software be installed using your system software