similar to: Issue with matrices within nested for-loops

Displaying 20 results from an estimated 300 matches similar to: "Issue with matrices within nested for-loops"

2004 Jan 22
4
Fitting compartmental model with nls and lsoda?
Dear Colleagues, Our group is also working on implementing the use of R for pharmacokinetic compartmental analysis. Perhaps I have missed something, but > fit <- nls(noisy ~ lsoda(xstart, time, one.compartment.model, c(K1=0.5, k2=0.5)), + data=C1.lsoda, + start=list(K1=0.3, k2=0.7), + trace=T + ) Error in eval(as.name(varName), data) : Object
2009 Oct 19
2
Time Series Data
Hi all and thanks in advance. I am regressing Time and Weight, and then predicting Weight at different Time. The format of the Time data is day/month/year. How can I get R to use time series data such as this? Keith -- M. Keith Cox, Ph.D. Alaska NOAA Fisheries, National Marine Fisheries Service Auke Bay Laboratories 17109 Pt. Lena Loop Rd. Juneau, AK 99801 Keith.Cox at noaa.gov marlinkcox at
2020 Aug 03
6
Deprecation of scp protocol and improving sftp client
I conjecture that only few of the existing use cases rely on remote expansion. In any case (no pun intended), IMHO it would be better to break a few of the current use cases but leave the majority functional - than kill scp for all. Regards, Uri > On Aug 3, 2020, at 02:50, Jakub Jelen <jjelen at redhat.com> wrote: > > ?On Sat, 2020-08-01 at 00:17 +0000, Blumenthal, Uri - 0553
2010 Jan 22
1
first and second derivative calculation
I would like to calculate a first and second derivative and am having problems finding a simple solution. My syntax may be off as I am not a mathematician, so pardon ahead of time. data: t<-seq(0,4, by=.1) The function is: H(t) = t^3-6*t^2+5*t + 30 from here I plot the curve: plot(x,y ,xlab="x-values", ylab="f(x)", type="l") But would like to similarly plot the
2009 Jul 30
2
wireframe color
Hello, hopefully simple question, but I cannot find the answer. I need to change the color from the standard default. Still want the scaled colors, but need different colors for different graphs. Code is: wireframe(z ~ y*x, mat.df, drape = TRUE, zlab = list("Water mass error (%)",rot=92), zlim=c(-50,180), xlab = list("Resistance error
2009 Aug 10
0
Matrix addition and multiplication
I posted this earlier, but am not certain that it was in fact posted, so I will try again. Hi, I have an equation Xcp and would like to look at errors affecting it. I am applying errors of -.58 to .1 to R and -.45 to .47 to Xc. I would like to look at all combinations. I set up a matrix function as follows and it does not work. On the last line, when it run, it does not seem like the two X’s
2010 Jan 11
1
Point plot comparisions
I would like to create a point plot with the following two sets of points: #1 plot(Day,Total) and #2 (Day,cons_hat). Total is the actual value seen and cons-hat is a predicted value. If possible, I do not want to stack them as they are quite long. (FYI, I did use the reshape on a previous post, thanks, but this one is different). Day Tank Tanks Total cons_hat 1 a a4 5.651017 5.59
2011 Mar 14
2
color under lm line
Hi, I would like to add a color under a lm line and not the plotted line. Is this possible? In the example, I do not want the area under the curve red, but rather under the llm line. x=seq(0,5,len=100) y=-(x-5)^2 llm<-lm(y~x) plot(x,y) polygon(c(x,x[length(x)]), c(y, y[1]), col='red') abline(llm) keith -- M. Keith Cox, Ph.D. Alaska NOAA Fisheries, National Marine Fisheries Service
2010 Apr 01
2
t.test data in one column
I need a two sample t.test between M and F. The data are arranged in one column, x. Cant seem to figure how to run a two sample t.test. Not really sure what this output is giving me, but there should be no difference between M and F in the example, but summary p-value indicates this. How can I run a two sample t.test with data in one column. x=rep(c(1,2,3,4),2)
2020 Sep 29
12
Human readable .ssh/known_hosts?
Hi list members, just tried to get some old records out of my known_hosts, which is 'HashKnownHosts yes'. Is there a way to unhash host names and/or IPs? Google tells about, how to add hosts, but not the opposite, may be I miss some thing. Is this does not work at all, is there a best practice for cleaning old hosts and keys out? Thanks, Martin! -- Martin GnuPG Key Fingerprint, KeyID
2012 Oct 26
1
asking about R Code
Hi, my name is Ellen. I want to ask you about R Code. I got a code for extracting a pixel value, but I can't compile it..  It is said "Error in is.data.frame(x) : object 'lena' not found" Here is the original full code: library(pixmap) lena <- read.pnm("oldlennablur.pgm") write.table(lena@grey,"mylenna", quote=FALSE, row.names = FALSE, col.names=
2009 Aug 06
0
Matrix function
Hi, I have an equation Xcp and would like to look at errors affecting it. I am applying errors of -.58 to .1 to R and -.45 to .47 to Xc. I would like to look at all combinations. I set up a matrix function as follows and it does not work. On the last line, when it run, it does not seem like the two X’s are not the same. Example: it is NOT 1+(162/1), but using another “R” value.
2009 Jul 30
0
wireframe color change from default
Hello, hopefully simple question, but I cannot find the answer. I need to change the color from the standard default. Still want the scaled colors, but need different colors for different graphs. Code is: wireframe(z ~ y*x, mat.df, drape = TRUE, zlab = list("Water mass error (%)",rot=92), zlim=c(-50,180), xlab = list("Resistance error
2010 Jul 06
2
grayscale wireframe??
I need grayscale formatting for a wireframe. The only col.regions that I can find are color palettes are all colored: rainbow(n, s = 1, v = 1, start = 0, end = max(1,n - 1)/n, gamma = 1, alpha = 1) heat.colors(n, alpha = 1) terrain.colors(n, alpha = 1) topo.colors(n, alpha = 1) cm.colors(n, alpha = 1) The code follows: X11() library(lattice) par(family="serif", cex=1.2)
2010 Jan 09
1
Boxplots
I have a data set with four columns and need to make boxplots from them. Data is as follows: tank Tanks Total cons_hat 1 a a4 5.651017 5.59 2 a a5 5.017499 5.29 3 a a6 4.894238 4.69 4 c c4 3.986347 3.40 5 c c5 4.099442 3.58 6 c c6 4.150522 3.64 7 h h4 5.187792 6.32 8 h h5 6.713422 6.44 9 h h6 5.168555
2010 Aug 26
1
non-linear plot parameters
I need the parameters estimated for a non-linear equation, an example of the data is below. rm(list=ls()) Time<-c( 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 8, 8, 8, 8, 8) Level<-c( 100, 110, 90, 95, 87, 60, 65, 61, 55, 57, 40, 41, 50, 47, 44, 44, 42, 38, 40, 37, 37, 35, 40, 34, 32, 20, 22, 25, 27, 29) plot(Time,Level,pch=16) Keith
2010 Sep 29
1
move colorkey
When using a wireframe, I need to move the colorkey from the "right" position (default0 towards the plot. I have also needed to adjust the height and used the code colorkey=list(T,space='right',height=.5) I have looked at documents (within levelplot) but cannot find a way to move the colorkey other than right, left, bottom and top. I do not understand corner interacts with x,
2010 Feb 02
1
Subset and point plot
OK, I need help plotting. I have column headings of Day, Wgt, Foodin, Rep, Grp and Tanks. Rep=c(1,2,3) and Tanks=c(a1,a2,a3,a4,a5,a6, c1,c2,c3,c4,c5,c6, h1,h2,h3,h4,h5,h6). I created a subset where I only would like Rep=2, and Tanks=c(a4,c4,h4) and would like to graph (points) of Wgt and Day. I would think that I only need 3 colors, but when I run with only 3, only 2 lines show up. When I add
2001 Aug 13
1
export-problem
Hello! I am trying to export a data-file from SAS to R. It says in the R program that the SAS file should be in XPORT-format. I assume that the file should have and .xpt extension. But when I try to open the file in R I get only the message "compressed" written all over. So, probably I should un-compress the file in the R-program, the question is how? Very greatful for quick help!
2011 Aug 01
2
if function problems
Dear All, Sorry to bother I want to write a function in R using if Say I have a dataset x, if x[i]<0, then x[i]=x[i], if x[i]>0, then x[i]=0 for example, x=-3:3, then using the function, x becomes [-3,-2,-1,0,0,0,0] I write the codes as follows, gjr=function(x) {lena=length(x) for(i in 1:lenx) if (x[i]<0) return (x[i]) if (x[i]>0) return (0) x} but then, doing gjr(x? it only