similar to: Equivalent of deal in R?

Displaying 20 results from an estimated 8000 matches similar to: "Equivalent of deal in R?"

2013 Mar 19
4
Copying rows in data frames
Hi, I'm trying to copy the first row of one data frame to another. This is the statement I am using : df2[1,]<-df1[1,]; I have printed them out separately: df1[1,] = A C D E F But after copying: df2[1,] = 96 29 88 122 68 Why isn't it copying? They are both data frames, and "as.character" isn't working either. Thanks for your input :) [[alternative HTML version
2013 Feb 28
4
Iteration through a list in R
Hello :) I'm just starting out with R and would appreciate your help with a couple of problems I am running into. I have used Sys.glob to get a list of all filenames having a particular file extension (in my case, *.txt) I would now like to use this list in the following manner: I would like to use each filename from the list and open that file into a tab separated matrix and proceed. How can
2018 Jan 18
3
request for code
Hi, I want to convert my MATLAB programs to R studio programs. Kindly guide on the same. [[alternative HTML version deleted]]
2013 Mar 25
3
nested 'while' loops
Hi everyone, I'm using the following code to go over every element of a data frame (row wise). The problem I am facing is that the outer 'x' variable is not incrementing itself, thus, only one row of values is obtained, and the program does not proceed to the next row. This is the code: while(x<=coln) { while(y<=rown) { n<-as.numeric(df[[y]][x]);
2013 Mar 22
3
trouble with data frame
Hi everyone, I am trying to use the values from every cell of the data frame in a further calculation. This is the code that I am using to catch every element of the data-frame. while (a<=10) { while (b<=10) { n<-as.numeric(df[a,b)]; ...; } } The problem is that when I print out 'n' I get the following errors : "NULL" (if printed without as.numeric), and
2011 Nov 26
5
cumsum in 3d arrays
Hello! Is it posible to apply /cumsum()/ along the 3rd dimension of 3D array? Something like matrlab function - /cumsum (*A*,dim)/ which returns the cumulative sum of the elements along the dimension of *A* specified by scalar dim. Thanks in advance ?eljka -- View this message in context: http://r.789695.n4.nabble.com/cumsum-in-3d-arrays-tp4110470p4110470.html Sent from the R help mailing
2011 Dec 17
1
cp2tform equivalent
I'm a new R user and am looking for an R equivalent to the Matlab 'cp2tform' function (see: http://www.mathworks.com/help/toolbox/images/ref/cp2tform.html). cp2tform accepts pairs of 2D control points and produces a least-squares optimized spatial transformation from one set of points to the other. Specifically, I'm looking to produce the coefficients of a 3rd order polynomial
2012 Jul 02
1
error to convert a Compute A^-1 B from Matlab to R using solve(A, B)
Dear Researchers, I need to convert the following equation in R from Matlab a = [x y ones(size(x))]; b = [-(x.^2+y.^2)]; a\b ans = -9.9981 -16.4966 -7.6646 my solution in R is: a = cbind(x,y,rep(1,length(x))) b = cbind(-(x^2+y^2)) > head(a) x y [1,] 14.45319 5.065726 1 [2,] 14.99478 5.173893 1 [3,] 14.64158 5.616916 1 [4,] 14.61803 6.624069 1 [5,] 14.19997
2018 Jan 18
0
request for code
> On Jan 18, 2018, at 7:49 AM, Anjali Karol Nair <anjali232 at gmail.com> wrote: > > Hi, > > I want to convert my MATLAB programs to R studio programs. > Kindly guide on the same. Hi, Using Google with a search phrase such as "MATLAB to R" will yield a number of possible resources for you such as: http://www.math.umaine.edu/~hiebeler/comp/matlabR.pdf which
2013 Mar 26
2
NaNS Error Message
Hi, I'm using R to do a series of calculation and I have gotten several warnings that say "NaNS produced". Whatever I could read on line gives me an idea that this warning is produced when the number is use is a negative log or otherwise mathematically problematic. I'm getting this error while using factorial() and gamma () on strictly positive numbers (always greater than zero).
2012 Jun 21
1
R function similar to gradient function in Matlab?
Hi, I am trying to convert some Matlab code into R for running some experiments and I was wondering if there is some function in R which does the work of the gradient function in Matlab calculating the "gradient" of 1-, 2- and 3-d images. I only need the 3-d calculations for running these experiments. Many thanks and best wishes, Ranjan
2013 Mar 07
2
Copying a dataframe
Hi, I am trying to create a data frame using the dimensions of another data frame that I have input. This is the code I am using: tab is the data frame that is input. c.leng<-length(tab[,1]); r.leng<-length(tab[1,]); opdf<-data.frame(ncol=c.leng, nrow=r.leng); a<-1; while(a<=c.leng) { opdf[[1]][a]<-tab[[1]][a]; a<-a+1; } This is the error message I am getting: Error in
2012 May 06
2
Translation of matlab vectors code into r
Hi there I am new user of r, i would need some help to translate som code for vectors in matlab to r. I have managed to translate the first 7 rows, but not the rest. Could anyone give me any suggestions for this problem?? Matlab code: tempo=[]; temps=[]; tempn=[]; tempao=[]; tempas=[]; tempan=[]; for k=1:5 tempo = [tempo n_o(k,:)]; temps = [temps n_s(k,:)]; tempn = [tempn
2011 Jan 28
3
any similiar R fuction for matlab function 'fprintf'?
Dear All, Currently, I am translating Matlab code to R. I met difficulties to translate such Matlab codes into R: fprintf(fid,(' SPLITTING RESULTS ')); fprintf(fid,(' \n')); fprintf(fid,' Data base to analyze is a matrix %4i x %2i ',[n m]); fprintf(fid,' \n'); fprintf(fid,' h is %2i',h); fprintf(fid,' \n'); fprintf(fid,' group=0
2009 Sep 05
3
Selecting biological data
Hello all, I am new to R but have some experience with MATLAB and am trying to make the switch. I generally find the two languages easy to adapt but there are a few routine tasks which I would like to run smoother in R and I am having trouble finding a help resource. Could someone suggest a guide to filtering, selecting, sorting, and processing biological matrix data? Here is a rudimentary
2009 Jul 03
2
Deos anyone know of a summary of conformability rules? along with a specific problem
The rules for conformability of objects required for various operators remain a mystery as do some related problems like the rules for recycling in creating arrays etc. Would someone be able to direct me to where such rules are stated? In a related vein, there are all manner of operations that are readily coded in Gauss or in MATA that fail, often mysteriously, in R. Are there some
2013 Mar 06
2
Generating unique filenames.
Hi, I am trying to create unique filenames for my output text file. The idea is that I would like to append a string to ".zsc.txt" so that all my files are uniquely named but with a similar format. I have tried adding the string variable to ".zsc.txt" while creating the output file name, i.e. write.table function, is what I have tried using : write.table(x,
2013 Nov 19
4
r Y MATLAB
Gracias a todos, lo que sucede es que nos visitará un colombiano matemático experto en ecuaciones diferenciales y tiene todo su expertise en matlab lo que haríamos ahora es llevar directamente las fórmulas matemáticas a R, Muchas gracias a todos -----Mensaje original----- De: r-help-es-bounces en r-project.org [mailto:r-help-es-bounces en r-project.org] En nombre de Isidro Hidalgo Enviado el:
2013 Mar 12
2
Troubleshooting code
Hi everyone, I am having trouble understanding where I went wrong with my code. It seems to logically be "all there" but the output says otherwise. I know this is a bit long but I can't seem to find the errors so I would appreciate your help :) This is my program : files<-Sys.glob("*.rescount.txt");length<-length(files);* #selecting all files of a particular
2010 Aug 03
4
hi!!! guestion!!
I made some matlab codes... Is there any method to perform matlab codes in R program?? -- View this message in context: http://r.789695.n4.nabble.com/hi-guestion-tp2311219p2311219.html Sent from the R help mailing list archive at Nabble.com.