Hi,

type
res #<ENTER> (now it contains your results as a vector)

or

head(res) #so you only see the first couple of values

or

plot(res) #to see a basic plot (you could set axis labels etc, but I suggets 
you to go ahead and read a tutorial on R!

Best, have a great time with R,
kd
________________________________
Felad�: dawood ahmad [dawoodma...@hotmail.com]
K�ldve: 2015. m�jus 5. 17:05
To: Kehl D�niel; r-help@R-project.org
T�rgy: RE: [R] Need Help!

Dear Daniel,

Thank you very much for such a kind reply. Actually, I couldn't understand well 
the criteria of help list, I am
sorry for that. I tried you method, unfortunately I couldn't get the output. It 
may be due to my lack of expertise in programming. At this point I need your 
help which will mean a lot to me. Moreover, if I use single value it gives the 
output. I am sending you two image files of the outputs. I will be really 
grateful to you if you guide me.

Thanking in advance,

With Best Regards,

Dawood



> From: ke...@ktk.pte.hu
> To: dawoodma...@hotmail.com; r-help@r-project.org
> Subject: RE: [R] Need Help!
> Date: Mon, 4 May 2015 20:17:48 +0000
>
> Dear Dawood,
>
> it is not a really good idea to open a new email with the same problem you 
> already posted earlier.
> I see you accepted some suggestions (HTML, seq) but not others (pi is a 
> defined constant in R, do not change it, type pi ENTER to see this.). I would 
> like to add one more, c is a function, do not use it as a variable name (I 
> used cc instead of c).
> I tried to figure out what you want here. The following code might do what 
> you want. It gives you a feeling about how you would create a basic loop. 
> There are nicer ways to do that in R. Note the [i]-s in the for loop!
>
>
> cc <- 0.5
> xc <- 2
> s <- 6
> Hc2 <- 30
> H <- 1
> ep<-seq(0.01, 0.49, by=0.001)
> res <- numeric(length=length(ep))
>
> for (i in 1:length(ep)){
> f<-function(k) 1.211*10^(-6)*Hc2/H*(trigamma( ((ep[i] + H/Hc2 + (2*xc/s)^2*(1 
> - cos(k*s))/2)/2*Hc2/H)) - trigamma(((cc + H/Hc2 + (2*xc/s)^2*(1 - 
> cos(k*s))/2)/2*Hc2/H)))
> res[i] <- integrate(f,-pi/s,pi/s)$value
> }
>
> Best,
> daniel
> ________________________________________
> Felad�: R-help [r-help-boun...@r-project.org] ; meghatalmaz&#243;: dawood 
> ahmad [dawoodma...@hotmail.com]
> K�ldve: 2015. m�jus 4. 10:29
> To: r-help@R-project.org
> T�rgy: [R] Need Help!
>
> Dear Sir/Madam,
>
> I hope you will be fine. I am new to R language. Recently, I am trying to fit 
> my data with one model.
> I am sending you the code and image file on which you can see the error I am 
> receiving instead of executing.
> If I give a single value to parameter "ep", it executes well, but if I make a 
> loop/seq for getting a range of data it shows
> error.I need you help in solving this problem.
>
> Thanking in advance,
>
> With Best Regards,
> Dawood

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to