Welcome to the Simplilearn Community

Want to join the rest of our members? Sign up right away!

Sign Up

Discussion - DS with R | Apr 7 - May 6 | Sayan

Priyanka_Mehta

Well-Known Member
Simplilearn Support
Hello All,

Greetings from Simplilearn!!

Let us have a discussion about the course, explore the course here and try to resolve all our queries related to the same.

Happy Learning!!

Regards,
Priyanka
GTA - Simplilearn
 

Poonam Choudhary Arora

Active Member
Alumni
Customer
Hi Priyanka , Need urgent help. I just finished and uploaded the project successfully. The write-up and the source code for my project are correct , but accidentally instead of screenshot , I might have uploaded a sample project guidance file . As the project is showing under assessment, I have no way to check and confirm if the correct document is loaded or not . Could you please assist with this issue.
Best regards
Poonam
 

Poonam Choudhary Arora

Active Member
Alumni
Customer
Hello All,

Greetings from Simplilearn!!

Let us have a discussion about the course, explore the course here and try to resolve all our queries related to the same.

Happy Learning!!

Regards,
Priyanka
GTA - Simplilearn


New
Hi Priyanka , Need urgent help. I just finished and uploaded the project successfully. The write-up and the source code for my project are correct , but accidentally instead of screenshot , I might have uploaded a sample project guidance file . As the project is showing under assessment, I have no way to check and confirm if the correct document is loaded or not . Could you please assist with this issue.
Best regards
Poonam
 

Narayana Surya

Well-Known Member
Alumni
HI
can you please let me know why i should not use $ for access elements in atomic vector ,i got this error for the below query
# logs is available in your workspace

# Define get_timestamp()
get_timestamp <- function(x) {
res<-list()
print(class(res))
for(z in x)
{
res<-append(res,z$timestamp)
}
return(res)
}

# Apply get_timestamp() over all elements i
lapply(logs,get_timestamp)
 

Karthik Shivana

Moderator
Simplilearn Support
Alumni
Is anyone looking into the issue . Is there a direct support line /chat feature to get resolution on urgent issues?


Hi Poonam,

We apologies for the delay in response. Please find the below details as you requested.

You cannot use "$" to access element in atomic vector. Because atomic vectors are extended to multiple dimensions as arrays.

If you want to use the $ operator, you simply need to convert dataset to a data.frame

Suggestion for your coding style,
  • The looping code above is good practice but normally you should not use loops in R. Loops are good for other programming.
 
Last edited:

Narayana Surya

Well-Known Member
Alumni
Hi
can any one explain what the following code will do i know it replaces string but i dont know what .*,?,\\,(.*?)..etc will do in this and what they represent in string when to use them

if (grepl("\\(.*?\\)", name)) {
gsub("^.*?\\((.*?)\\)$", "\\1", name)
# men: take name before comma and after title
} else {
# Finish the gsub() function
gsub("^(.*?),\\s[a-zA-Z\\.]*?\\s(.*?)$", "\\1", name)
}
}

regards,
Surya
 

_20157

Member
Alumni
Hi,

I cannot register to "Data science with R" online classes if any is available, since the classes do not appear on my site.
I have already terminated the SAS course and I cannot participate in any other online courses.
Would you please help me how to register for this course?

Thanks
Afsoon Ghaemi
 

Narayana Surya

Well-Known Member
Alumni
Hi can any one please tell me why i gets this error message "Error in eval(ei, envir) : object 'fudata' not found"

names<-c('surya','teja','varsha','anil','raghava','siri','adi','darlingdas')
tel<-c(90,89,76,56,45,78,90,12)
hin<-c(100,79,67,45,76,89,100,84)
eng<-c(90,80,67,65,45,32,90,71)
mat<-c(99,100,100,88,71,53,21,32)
sci<-c(100,96,78,65,45,43,71,90)
soc<-c(100,89,78,67,45,34,24,12)
stdd<-data.frame(names,tel,hin,eng,mat,sci,soc)
fudata<function(stdd)
{
paste('now the process starts')
for (i in 1:length(stdd$names))
{
sum1=0

for (j in 2:8)
{
paste("value of i",i)
paste("value of j",j)
sum1=sum1+stdd[i,j]
}
print('succcess1')
}
print('success2')
}
 

Priyanka_Mehta

Well-Known Member
Simplilearn Support
Hi,

You have just missed a "-" in your code, so you are getting this error.

names<-c('surya','teja','varsha','anil','raghava','siri','adi','darlingdas')
tel<-c(90,89,76,56,45,78,90,12)
hin<-c(100,79,67,45,76,89,100,84)
eng<-c(90,80,67,65,45,32,90,71)
mat<-c(99,100,100,88,71,53,21,32)
sci<-c(100,96,78,65,45,43,71,90)
soc<-c(100,89,78,67,45,34,24,12)
stdd<-data.frame(names,tel,hin,eng,mat,sci,soc)
fudata<-function(stdd)
{
paste('now the process starts')
for (i in 1:length(stdd$names))
{
sum1=0

for (j in 2:8)
{
paste("value of i",i)
paste("value of j",j)
sum1=sum1+stdd[i,j]
}
print('succcess1')
}
print('success2')
}

This code will work for you now without any error. I hope this will help you.
 
Top